1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Can i check if visitors are seeing older version of site?

Discussion in 'Web Design and Development' started by sk3pt1c, Nov 21, 2012.

  1. macrumors 6502a

    sk3pt1c

    #1
    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
     
  2. macrumors 6502a

    sk3pt1c

    #2
    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?
     
  3. macrumors 68000

    SrWebDeveloper

    #3
    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">
     

Share This Page