Forum Moderators: coopster

Message Too Old, No Replies

another cookie / caching / reload problem

         

jamie

10:37 pm on Dec 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi,

just trying to implement a style switcher using php.

but because i explicitly tell the browser to cache my pages, even though i header() back from the style_switcher.php to the referring page, the old style is still in place. the cookie with the new style is set correctly, but until i manually force a refresh, the new style can not be seen.

anyone any tips, i am absolutely stumped...

many thanks!

jamie

7:09 am on Dec 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



fixed it,

i appended a random value to the URL, so that the page can never be cached.

header("Location: " . $_GET['referer'] . '?' . time());

i had to alter my script a bit to allow this sort of URL, but the switcher works fine now!