Closed Thread Icon

Topic awaiting preservation: Force Cache Drop (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=25834" title="Pages that link to Topic awaiting preservation: Force Cache Drop (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Force Cache Drop <span class="small">(Page 1 of 1)</span>\

 
Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 05-22-2005 13:11

Is there a way to force no-cache explicitly with javascript (not using meta tags)? I'm having trouble with xml objects staying around too long and not refreshing, especially when I make changes on the server-side, they are not always reflected to the client right away.

Karl..

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 05-22-2005 20:35

Are the XML files you request generated as real files, or are they always (re)generated by a server side script on every request ?

Anyway, you could use a little server side script to force/set the cache and last-Modified date HTTP headers when an XML stream is requested on your server.

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 05-22-2005 20:54

I use the xmlhttp request to retrieve my xml source from an asp page which returns xml. I also use the xmlhttp request to retrieve my stylesheet, but i point explicitly at the stylesheet (I guess I could point at an asp page to return the stylesheet and then I might have control of the caching this way - is this your idea?).

Karl

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 05-22-2005 21:00

yep that's my idea

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 05-22-2005 22:39

So far (in the past) the best way I have seen to *trick* the browser into not caching is by throwing a random querystring val in get. Do you have any other suggestions?

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 05-22-2005 22:49

No other suggestion.

Adding a random querystring is THE ultimate solution to avoid the problems of cache.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 05-23-2005 01:37

agree!

poi recommended that solution to me in the past, and i use it successfully all over my site now.

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 05-23-2005 03:08

The only ~grumble~ I have with this solution, is that it clutters up the logs a bit..

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 05-23-2005 10:54

« BackwardsOnwards »

Show Forum Drop Down Menu