bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

cached images are not checked for reload when setting Document.location.href




11 years ago
8 years ago


(Reporter: philippe Arné, Unassigned)



2.0 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)




11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20070725 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20070725 Firefox/

Everytime problem with seaMonkey 1.1.1 and 1.1.4 and
firefox , but not with Mozilla 1.7.7 and IE.

In a first test , I use my gecko's browser

I created four pages containing the same image (jpg)

the first page is loaded using a loadURI 
the second page is loaded via a ScriptContext->EvaluateString execution of document.location.href=the second page
The third page is loaded via a loadURI
The fourth page is loadad via loadURI

The server is jetty

for the first ,third and fourth pages, int the jetty's logs appears the request
for the page and the image.
for the second page only appears the page loading (not the request for the image)  

So I did a second test using only firefox and the jetty server (not our program)

I call the first page using

this page is loaded correctly. In the jetty's logs, appears :
 - Page loading with code 200
 - Image loading with code 304 as expected

I put into the first page a <A href="javascript:test()" > </A>

where test is a javascript function in the page 

	function test(){
	document.location.href ="second_page.HTML";

Wen I click on the link, in the logs I see only the page loading.
The image request is not into the logs.

The second page and the third page have a <A href="thrid_page.html"> and <A href="fourth_page.html"> respectivly.

when I select these links, in jetty's logs appear
- request for the page with code 200
- request for the image with code 304

The parameters for the cache are

pref("browser.cache.disk.enable",           true);
pref("browser.cache.disk.capacity",         51200);
pref("browser.cache.memory.enable",         false);
//pref("browser.cache.memory.capacity",     -1);
// -1 = determine dynamically, 0 = none, n = memory capacity in kilobytes
pref("browser.cache.disk_cache_ssl",        false);
// 0 = once-per-session, 1 = each-time, 2 = never, 3 = when-appropriate/automatically
pref("browser.cache.check_doc_frequency",   1);
// Fastback caching - if this pref is negative, then we calculate the number
// of content viewers to cache based on the amount of available memory.
pref("browser.sessionhistory.max_total_viewers", -1);

Reproducible: Always

Steps to Reproduce:
1.Create four pages with the same image (<img src="Theimage.jpg"/>
2.In the first page put <A href="javascript:test()" where test sets document.location.href="secondpage.html"
3.In the second page put a <A href="thirdpage.html"
4. in the third page put a <A href="fourthpage.html"
5. starts the server and calls the first page from browser

Actual Results:  
There is not request sended to the server for the image if a page is loaded using document.location.href

Expected Results:  
The requesthas to be send everytime, even in a javascript

This is a very critical problem for our product.
We use gecko, and the pages are made by the customers.
No restrictions have to existing for the javascript usage or html usage....


11 years ago
Keywords: regression


11 years ago
Duplicate of this bug: 395889

Comment 2

11 years ago
note: see bug 394729 for more logging

Comment 3

11 years ago
I mean bug 395889
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
Severity: critical → major
Version: unspecified → 2.0 Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.x or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Last Resolved: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.