#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Burlington, VT
    Posts
    344
    Rep Power
    14

    Cache & JavaScript SetTimeout?


    Hello,

    I know this is going to sound a bit far fetched, but... I was wondering if you are using a JavaScript SetTimeOut call on a page that is cached, will the settimeout continue or restart the countdown script everytime the page is loaded...

    For example,

    I am using the settimeout function to redirect the page after 24 minutes. It works fine generally in all cases except for people whom do not have the cache set to expire everytime the page is loaded. So in some cases (if the user's page is cached) the sittimeout may occur randomly...

    Does this make any sense or am I way off?

    Thanks,
    -jbuckle24
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    24
    It sounds confusing but I'm guessing you just want it so that the page is a brand new version each time and not one taken from the cache?

    Have a look at the META tag for cache-control.

    Cache-Control: must-revalidate
    Cache-Control: max-age=3600
    Cache-Control: no-cache

    Have a look at:

    http://vancouver-webpages.com/META/FAQ.html#nostale

IMN logo majestic logo threadwatch logo seochat tools logo