Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

Поиск в поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

What can cause an XMLHttpRequest refresh?

  • 3 ответа
  • 1 имеет эту проблему
  • 37 просмотров
  • Последний ответ от cor-el

дополнительные действия

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

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

Изменено GilDawson

Выбранное решение

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.

Прочитайте этот ответ в контексте 👍 1

Все ответы (3)

дополнительные действия

Выбранное решение

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