I do a number of sports related websites for athletic programs. One major thing that has always bugged me was clients calling and saying something they sent in wasn't up on the site, when I put it on days or even weeks ago. I realize that each individual browser can be set to save history or cookies differently, however even on my browser which I have set to never save history or cookies, my sites will still pull up a previous version until I refresh the browser, then I will see the latest content.
Is there something I can do to prevent this from happening? A code I can insert, or anything at all? I would just like for my sites to load the latest content each time, without the viewer needing to refresh their browser to see if the content is new or not. (Note: this happens with text and images, so it is not just the image based content). Here is an example of one of my sites, just as a reference of what I do.
Thanks in advance for any help that's provided!
www.mcgilltoolenfootball.com/
Website Pulling Up Old Content - Post...
One option is to use an auto refresh, but that reloads the page:
Might be annoying right?
Another option is to set the cache but I've read in the past that there may be issues with chrome, I don't know if that has been fixed?
Again you may want to google that one too to see where it is now days...
how it is with SEO etc.
You put these in the HEAD of the doc along with your other meta tags.
<meta http-equiv="refresh" content="5" >
That will refresh the page after 5 seconds, you can google that to read more about it. You set it above 5 seconds to consider page loading time. Might be annoying right?
Another option is to set the cache but I've read in the past that there may be issues with chrome, I don't know if that has been fixed?
<meta http-equiv="cache-control" content="no-cache, must-revalidate, post-check=0, pre-check=0">
<meta http-equiv="expires" content="Tue, 31 Aug 2016 00:00:00 GMT">
<meta http-equiv="pragma" content="no-cache">
You update that one.<meta http-equiv="expires" content="Tue, 31 Aug 2016 00:00:00 GMT">
<meta http-equiv="pragma" content="no-cache">
Again you may want to google that one too to see where it is now days...
how it is with SEO etc.
You put these in the HEAD of the doc along with your other meta tags.
Thank you for the help!
The first one would be awesome if there was a way to set where it automatically refreshed but only did it one time, not once every so many seconds.
On the second one, I need some help if you would. I see the date in there, and you said it needs to be updated. What exactly would you do to update it? Change the expiration date to what? Thanks!
The first one would be awesome if there was a way to set where it automatically refreshed but only did it one time, not once every so many seconds.
On the second one, I need some help if you would. I see the date in there, and you said it needs to be updated. What exactly would you do to update it? Change the expiration date to what? Thanks!
You'd need to go to a javascript for a refresh onload for the first one, the meta only refreshes like that.
More on the script here:
https://developer.mozilla.org/en-US/doc … w/location
You'd use
For the cache in this part content="Tue, 31 Aug 2016 change that in the HEAD when you upload toady it'd be content="Wed, 17 Aug 2016 for example.
More on the script here:
https://developer.mozilla.org/en-US/doc … w/location
You'd use
<script>
location.reload(true);
</script>
To force reloading the current page from the serverlocation.reload(true);
</script>
For the cache in this part content="Tue, 31 Aug 2016 change that in the HEAD when you upload toady it'd be content="Wed, 17 Aug 2016 for example.
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.