Results 1 to 3 of 3
Thread: Page update problem
-
09-05-2006, 10:34 AM #1New Member
- Join Date
- Sep 2006
- Posts
- 2
Page update problem
Hi. First post here, though i've been reading these boards for a while.
I've got a couple of different sites, with lunarpages and dotable. I've got a problem with updates not showing up. When I make updates, the updated page doesn't show up automatically when i visit it, I have to refresh to get the new page. This happens with both firefox and IE. I understand that this is due to the cache, and its not a problem for me. But some of my clients are concerned about it, that visitors to their sites are not seeing the latest pages as soon as possible. I thought about using a meta tag to stop caching, but won't this mean that images, etc will have to reload each time? I have some pages that are image heavy so i'd prefer not to have to do this. So what i'm basically asking is - is there any server-side way of ensuring that the visitor gets the most up to date page?
Thanks in advance for any suggestions.
-
09-05-2006, 11:23 AM #2Junior Guru Wannabe
- Join Date
- Jul 2006
- Location
- Switzerland
- Posts
- 97
If you only change your headers on html or whatever pages you are serving, and not on your images, then only the webpages will have to be reloaded on revisits and not the images.
You can send a header like:
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
You can place it directly in your html pages with the following in the header part:
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
-
09-05-2006, 06:01 PM #3New Member
- Join Date
- Sep 2006
- Posts
- 2
Works like a charm, thanks a million. I had just assumed the no-cache tag would mean that images wouldn't be cached, but it appears not. Thanks again.