Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sk3pt1c

macrumors 6502a
Original poster
Nov 29, 2005
918
6
a simulacrum
We recently relaunched one of our sites where i work and we've had an issue of visitors accessing cached pages and not seeing the redesigned content.

Is there any way i can check if someone is visiting the cached page and tell them to reload?

Or force a reload on all pages or something like that?

It's crucial for this to happen cause we've had visitors send contact form data from older forms and we've had buggy data because we've updated for the new forms.

Thanks
 

sk3pt1c

macrumors 6502a
Original poster
Nov 29, 2005
918
6
a simulacrum
OK, done some digging, there is a cache meta tag but that doesn't get honoured by all browsers, as far as i've read.

the best option for usability's sake would be to detect if the page displayed is cached and popup a javascript alert or something, telling the user to reload the page.

or i could just add a refresh meta to all pages? that doesn't seem practical though. maybe i could limit it to run only once?
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA
Noting this does not guarantee success across all platforms, this sequence will handle most, set server side (not client side, that disrupts SEO):

Code:
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.