473,396 Members | 1,775 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,396 software developers and data experts.

XMLHttpRequest in FireFox and cache (Part 2)

Martin Honnen wrote:
You can set HTTP request headers if you need to
var httpRequest = new XMLHttpRequest();
httpRequest.open('GET', 'file.xml', true);
httpRequest.setRequestHeader('Cache-Control',
'desired cache value here')


if you send
httpRequest.setRequestHeader('Cache-Control', 'public'); or
httpRequest.setRequestHeader('Cache-Control', 'max-age=3600, public');
you get :
Cache-Control: (max-age=3600,) public, no-cache
Firefox just adds to any Cache-Control header the 'no-cache' string
This apparently disables the cache.
(about:config cache setting is ignored.)
Watching the protocol with the tamper extension you can see
that firefox sets LOAD_BACKGROUND, LOAD_BYPASS_CACHE and
INHIBIT_CACHING flags.
LOAD_BACKGROUND seem to be related to async mode of images and
http_requests

any solutions?

Andres Obrero

Aug 7 '05 #1
2 3292
VK
> Firefox just adds to any Cache-Control header the 'no-cache' string
This apparently disables the cache.


Yup...

Go to bugzilla.mozilla.org and look for "timed download privacy
exploit".

My wild guess would be that they hash-hash "fixed" this exploit in sich
rude way. Hopefully they will come with something *much* better in the
next milestone.

Aug 7 '05 #2

warteschlange wrote:
if you send
httpRequest.setRequestHeader('Cache-Control', 'public'); or
httpRequest.setRequestHeader('Cache-Control', 'max-age=3600, public');
you get :
Cache-Control: (max-age=3600,) public, no-cache
Firefox just adds to any Cache-Control header the 'no-cache' string
This apparently disables the cache.
(about:config cache setting is ignored.)


I think there is a bug on this on https://bugzilla.mozilla.org/ that is
now fixed in the nightly trunk builds (e.g Mozilla 1.8 nightly or Deer
Park nightlies):
<https://bugzilla.mozilla.org/show_bug.cgi?id=268844>
I don't think you can change anything with XMLHttpRequest in Mozilla
1.7.x respectively Firefox 1.0.x releases, there you will have to live
with broken caching.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 7 '05 #3

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

Similar topics

6
by: Chris Smith | last post by:
This is a bit of a weird problem. Unfortunately, I can't reproduce it in a simple example, so I can only poke it out there and see if anyone has seen something similar. I have a script that...
3
by: Sergey Surkov | last post by:
Hello Does anybody know how to make FireFox to cache data that comes via XMLHttpRequest? Here is the issue I deal with: - On the web server (apache2) I have a static xml file test.xml - When I...
76
by: kwilder | last post by:
This works, but it doesn't load the latest version of the xml if it was just modified without closing and reopening the browser. Here's the scenario: I have an xml doc called results.xml. It...
42
by: Greg | last post by:
Hi, I've designed a bookmark in Ajax / PHP that I will put soon on sourceforge.net. But I've got an very tricky bug. I try it on some computers with Internet Explorer/Windows, Firefox...
27
by: ted benedict | last post by:
hi everybody, i hope this is the right place to discuss this weird behaviour. i am getting dynamically generated text or xml from the server side using xmlhttprequest. if the server side data is...
13
by: TLaufenberg | last post by:
I'm new to Javascript programming and I've run into a bit of a snag with making an XMLHttpRequest in the Safari browser. Actually, the request doesn't work in Firefox either but only when I use a...
5
by: Peter Michaux | last post by:
Hi, The FAQ correctly says the following: "Mozilla (NN6.2+, Firefox, Ice Weasle etc), Opera 7.6+, Safari1.2+, the Windows version of IE versions 5+, and some other browsers provide the XML...
1
by: Charlie | last post by:
I am trying to make an XMLHttpRequest which violates the default "same- origin"policy in Firefox. I checked the archives and found a method that should work but it does not. Below is the test code...
1
by: Iain Adams | last post by:
My code is as follows. http_request = false; if (window.XMLHttpRequest) { alert("firefox"); http_request = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { alert("ie");
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: 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
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.