Are XmlHttpRequests being cached?

M

Martin

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?
 
M

Martin Honnen

Martin wrote:

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/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top