
What can cause an XMLHttpRequest refresh?
I am developing a JavaScript program that uses XMLHttpRequest to fetch an XML file from my Apache server. It all works splendidly, but changes to my XML file that I make externally are not reflected in my test page until I Quit and ReLaunch Firefox. Is there another way to get an XMLHttpRequest to re-read the file off the server?
Changes to my javaScript program, or the HTML that carries it, are reflected quickly when I simply click on the Refresh icon at the right end of the URL bar. (I think I may have set something in Preferences to get this effect.) However, any changes I make with a text editor to the XML file on the server that the program is fetching don't show up right away. I have to Quit and ReLaunch Firefox to get those changes to show up.
Evidently, the XMLHttpRequest mechanism must be caching the file somewhere. This isn't a terrible idea, as the file is rather large, but it is annoying whilst developing. Is there a way to mitigate this caching?
--Gil
Modified
Chosen solution
Try to reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
- Press and hold Shift and left-click the Reload button.
- Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
- Press "Command + Shift + R" (MAC)
You can also try to disable the HTTP cache while testing by setting the Boolean pref network.http.use-cache to false on the about:config page.
A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.
All Replies (3)
Chosen Solution
Try to reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
- Press and hold Shift and left-click the Reload button.
- Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
- Press "Command + Shift + R" (MAC)
You can also try to disable the HTTP cache while testing by setting the Boolean pref network.http.use-cache to false on the about:config page.
A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.
Thanks, cor-el. Command-Shift-R seems to do the trick!
Thanks also for introducing me to the Evangelism forum and the about:config page. Seems I have new worlds to explore!
Thanks for your help.
--Gil
You're welcome