about:blank should derefence to an empty stream

RESOLVED FIXED in mozilla1.9.3a5

Status

()

Core
Networking
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: hsivonen, Assigned: Steffen Wilberg)

Tracking

({html5})

Trunk
mozilla1.9.3a5
html5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

Steps to reproduce:
 1) Load about:blank
 2) View source.

Actual results:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title></title></head><body></body></html>

Expected results:
Per http://www.whatwg.org/specs/web-apps/current-work/#fetching-resources expected the source to be empty.

Additional info:
This affects the DOM you get from <iframe src="about:blank"></iframe>. With the empty string, the doctype and the title element shouldn't be in the DOM.
See also http://www.ietf.org/id/draft-holsten-about-uri-scheme-02.txt

Comment 2

8 years ago
link view-source:about:blank

Comment 3

8 years ago
It should have Content-Type: text/plain; charset="utf-8" and be an empty document. Not Another one Content-Type: text/html; charset="iso-8859-2" empty document shown in quirks mode. We promote standards, not IE.

Comment 4

8 years ago
I have found this bug because I don't like the fact that Firefox uses Quirks mode for about:blank.

Comment 5

8 years ago
Firefox should completely get rid of quirks mode and start to control markup syntax strictly. (sorry for my English). It should use only XHTML 1.1 because of the strict error checking and develop itself in that direction, develop in XHTML 2.0 rendering (W3C should start works on it again), not for another soup of tags, called HTML 5.
(In reply to comment #4)
> I have found this bug because I don't like the fact that Firefox uses Quirks
> mode for about:blank.

Could you please elaborate on what kind of problems the quirks modeness of about:blank causes to you in practice?

Comment 7

8 years ago
I did not write that comment, but I can show tou problems with it I can see.
At first:
https://bugzilla.mozilla.org/show_bug.cgi?id=514412#c0
At second:
Firefox still uses quirks mode and do not show people that era of IE faded away permamently, and websites, or rather files, like that:
http://www.mif.pg.gda.pl/homepages/rsob/
still are created. Quirks mode should be completely deprecated and thrown out from the Internet and all browsers.
At third:
Firefox promotes strict standards, not soup of tags, and that is not exactly like 'We believe that the internet should be public, open and accessible.'

Comment 8

8 years ago
(In reply to comment #6)
> (In reply to comment #4)
> > I have found this bug because I don't like the fact that Firefox uses Quirks
> > mode for about:blank.
> 
> Could you please elaborate on what kind of problems the quirks modeness of
> about:blank causes to you in practice?

In practice, this bug doesn't cause any problems. But the quirks mode is the most conspicuous part of the bug for a general user. I have never known that about:blank should refer to an empty stream, but everybody has heard that quirky mode is against standard. That's why I considered it a bug - and found it here and voted for it (how can such an empty page use a quirky mode? it has no vendor-specific elements).
(Assignee)

Comment 9

7 years ago
Created attachment 441142 [details] [diff] [review]
patch

I had to change the expected result of the designmode test.
Old: <head><title></title></head><body>abc</body>
New: <head></head><body>abc</body>

Should the mime type be changed to text/plain?
Assignee: nobody → steffen.wilberg
Status: NEW → ASSIGNED
Attachment #441142 - Flags: review?(hsivonen)
(Assignee)

Comment 10

7 years ago
Probably not:

> Applications resolving the URI "about:blank" MUST return a resource of zero
> length, containing no data, with the media type "text/html" and the character
> encoding "UTF-8".
http://tools.ietf.org/html/draft-holsten-about-uri-scheme-04#section-5.1.1
(Assignee)

Updated

7 years ago
Attachment #441142 - Flags: review?(hsivonen) → feedback?(hsivonen)
Comment on attachment 441142 [details] [diff] [review]
patch

Looks good to me.
Attachment #441142 - Flags: feedback?(hsivonen) → feedback+
(Assignee)

Updated

7 years ago
Attachment #441142 - Flags: review?(bzbarsky)

Comment 12

7 years ago
Comment on attachment 441142 [details] [diff] [review]
patch

OK, let's give his a shot...  I assume this still creates an <html> and <body> in the sink, right?
Attachment #441142 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 13

7 years ago
How do I tell? Both Firebug and DOM Inspector show <html>, <head> and <body>. Only <title> is missing.

Comment 14

7 years ago
> Both Firebug and DOM Inspector show <html>, <head> and <body>.

Then the answer to my question is "yes".  ;)
(Assignee)

Comment 15

7 years ago
http://hg.mozilla.org/mozilla-central/rev/ac54f9c611f1
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in before you can comment on or make changes to this bug.