Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / March 2005



Tip: Looking for answers? Try searching our database.

Are XmlHttpRequests being cached?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin - 31 Mar 2005 16:34 GMT
I have a situation where I'm using XmlHttpRequests to update some data
in a table every few seconds. The script that executes when the data
comes into the browser checks to see if the data has changed compared
to that currently displayed - if it hasn't changed, it does not update
anything.

I'm having a problem on ONE single computer in that changed data is
being sent but the script doesn't see it. I found that if I cleared
the browser cache, then it worked as expected - once - then it fails
again.

This HttpRequest contains only a small data string - it's not an
entire page. Is there a way to get the browser to use the lastest data
and not the cached data?
Martin Honnen - 31 Mar 2005 16:46 GMT
> This HttpRequest contains only a small data string - it's not an
> entire page. Is there a way to get the browser to use the lastest data
> and not the cached data?

It is call XMLHttpRequest as it uses HTTP so you can use all the tools
(e.g. HTTP headers) HTTP provides to suggest whether/how a resource is
cached or not:
  <http://www.mnot.net/cache_docs/>

Signature

    Martin Honnen
    http://JavaScript.FAQTs.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.