Firefox reloads the page if there is an img element with an empty src attribute

RESOLVED DUPLICATE of bug 106912

Status

()

Firefox
General
--
critical
RESOLVED DUPLICATE of bug 106912
14 years ago
12 years ago

People

(Reporter: adam, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

Good morning,

Firefox reloads the page if there is an img element with an empty src 
attribute, though it does not run the window.onload event twice.

I have included some very simple source that will reliably reproduce the 
problem. It simply increments a session variable so you can see how many times 
the page has refreshed. When the src attribute of the img element is empty, 
the session variable increments by 2 each time. When there is *anything* in 
the attribute, regardless of whether it is a valid file URI or not, the page 
loads only once and the session variable increments once, as you would expect.

Note that regardless of how many times the browser refreshes, onload is called 
only once!

Thanks!
Adam 

Reproducible: Always
Steps to Reproduce:
<%@ Page language="c#"%>
<HTML>
	<HEAD>
		<title>Firefox Bug</title>
	</HEAD>
	<body onload="alert('page loaded');">
		<%
		if ( Session["Counter"] == null )
			Session["Counter"] = 0;
		
		Session["Counter"] = (int)Session["Counter"] + 1;
		Response.Write(Session["Counter"]);
		%>
		
		<img src="" width=10 height=10>
			
	</body>
</HTML>

Actual Results:  
Page renders, but has hit the server twice.

Expected Results:  
Render, hit server once only.

I note the severity as Critical, because I have lost a day on this bug, and I 
was on the verge of mandating *any* other browser!

Comment 1

14 years ago
That's what is supposed to happen.

*** This bug has been marked as a duplicate of 263980 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---

*** This bug has been marked as a duplicate of 106912 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.