Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh page reload - ensuring pages don't cache in browsers #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tpmccallum
Copy link
Contributor

@tpmccallum tpmccallum commented Nov 30, 2017

Just adding a few lines to ensure that the page reloads (does not cache), when we add new content.
This will provide users with fresh content as we update our site.
It is my view that our content is lightweight and therefore browser caching is not necessary on this site.

Just adding a few lines to ensure that the page reloads (does not cache) for past visitors of the site, when we add new content.
Will need to come up with a better solution long term.
@tpmccallum
Copy link
Contributor Author

Tested this on my local machine now.
If we also just re-run the
bundle exec jekyll serve --future
it will dish out the fresh content.

@tpmccallum tpmccallum changed the title Page reload - short term fix Fresh page reload - ensuring pages don't cache in browsers Nov 30, 2017
@rolyatsats
Copy link
Member

There's redundancy with the cache-control and expires meta tags. I believe we only need to define them once. The closing / before > is also optional with html5. I've seen no-store in addition to no-cache for cache-control too.

<meta http-equiv="cache-control" content="no-cache, no-store">
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">

Removing redundant xml elements and attributes, in reply to Taylor Brink's comments
@tpmccallum
Copy link
Contributor Author

Hi @brinkt ,
I have modified the code (pasted your suggestion in).
Tested locally on my machine, works.
Thanks
Tim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants