473,395 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Are XmlHttpRequests being cached?

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?
Jul 23 '05 #1
1 1270


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

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Robert Scheer | last post by:
Hi. I have two .js files that are used on several of my pages. I made some changes in one of the files. When I call the pages, the old functions are called because of the browser's cache. What...
1
by: Harod Ruthgar | last post by:
var image = new Image(); image.src="pathToTheFile"; The above code is called 25 times (with different pathToTheFile) within a loop. I manually checked the cache directory and not all images...
21
by: Jay Levitt | last post by:
I'm just starting to play around with CSS and MovableType. My home page (http://www.jay.fm) now validates on both the CSS and the XHTML. However, the Google cached version shows the wrong font in...
10
by: cosmic foo | last post by:
I have a page with about 100 images of about 10k each. where a typical img tag looks like this, <img src="item001.jpg" height="70" alt="" onMouseOver="showPic(this)" border="0"> Not all the...
2
by: ALPO | last post by:
ANy good examples of paging against a cached dataset. Our datasets will be cached in viewstate.
2
by: Thomas | last post by:
Hi, Is AppSettings cached? And is the cache updated when web.config changes? - Thomas
2
by: JTS | last post by:
How can I view all pages, user controls, etc that are currently cached? I simply want to know which pages have been cached, and which versions of the pages are currently cached. Is this possible?
17
by: Assaf Lavie | last post by:
I'm trying to run multiple xmlhttprequests in parallel in response to a button click. I want to launch N asynchronous requests and handle the responses as they come. The problem is that no request...
4
by: jeff.maildump | last post by:
Hi, I've got multiple xmlhttprequests which are in a loop. So this is the loop I have so far, with the closure given to me in a previous post: ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.