I need a solution
Is there a way to force a visitors browser to refresh when i update my page. It gets updated quite a bit and I don't want my visitors to have to press the refresh button every time the page changes.
Something like this at the top of your HTML:
<META HTTP-EQUIV="refresh"; content="10; url=<MY_URL>">
If it is the same page which is to be refreshed then something like:
<META HTTP-EQUIV="refresh"; content="10;">
will do I think.
Forgot to say that the '10' in the
content="10; ....." is the number of seconds between refreshes.
Bear in mind that if this is at the top of every page, then *every* page will keep refreshing itself every 10 seconds... (could get annoying)
Actually no bigbed, I don't think that is what he wants...The problem with your solution is, what if you don't want someone to be completely redirected to another page, but rather would like the page to be updated, ONLY when the content has changed... You dont want the user to view the cached version but rather the new one..
Here is how..
<META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT">
will result in the HTTP header:
Expires: Tue, 20 Aug 1996 14:25:27 GMT
This can be used by caches to determine when to fetch a fresh copy of the associated document. So, if you update your page every day, you can set the Expires date/time to the next day. Or whenever you plan to update it.
If you want, you can set it to Jan 1st 1970, so that evertime someone hits your site it will grab a new copy as opposed to relying on the cached version.
Thanks a bunch!
Solve your biggest tech problems alongside global tech experts with 1:1 help.
Tackle projects and never again get stuck behind a technical roadblock.
How it Works
Plans and Pricing
Become an Expert
Who We Are
Join Our Team
Hall of Fame
Experts Exchange, LLC.
All rights reserved. Covered by US Patent.