dynamic insert http-equiv='refresh' meta on an already loaded document doesn't create navigation
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: karlcow, Assigned: sefeng)
References
()
Details
Attachments
(3 files, 1 obsolete file)
See the test case with this document.
In an already loaded document, insert dynamically anywhere in the body
of the document, a meta
with http-equiv='refresh'
such as
<meta http-equiv="refresh" content="0; url=http://www.mozilla.org/">
Actual:
nothing is happening
Expected:
navigation to http://www.mozilla.org/ should happen
- FAIL in Firefox Nightly Desktop 80.0a1 (2020-07-16) (64-bit)
- WORK in
- Safari Tech Preview Release 110 (Safari 14.0, WebKit 15610.1.21.0.2)
- Chrome Canary Version 86.0.4204.0 (Build officiel) canary (64 bits)
Specification
https://html.spec.whatwg.org/#pragma-directives
When a meta element is inserted into the document, if its http-equiv attribute is present and represents one of the above states, then the user agent must run the algorithm appropriate for that state, as described in the following list:
This creates a webcompat issue
https://webcompat.com/issues/55451
Updated•4 years ago
|
Comment 1•4 years ago
|
||
https://searchfox.org/mozilla-central/rev/d6d8fcc22c3820f2ae08229e0d37be19fba74db9/dom/base/nsContentSink.cpp#736-775 runs during parsing. It should probably run whenever a meta element is added to tree.
Assignee | ||
Comment 3•4 years ago
|
||
Spec: https://html.spec.whatwg.org/#pragma-directives
When a meta element is inserted into the document, the
refresh steps should run if certain criteria is met.
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
It turns out we did this intentionally/differently per https://github.com/whatwg/html/pull/2198#issuecomment-268356668 and https://www.w3.org/Bugs/Public/show_bug.cgi?id=28520#c5, and there's whatwg/html issue to investigate this behaviour.
I think we need some context here to learn why we did this, and this was something I couldn't figure from reading our code.
Perhaps annevk can provide something here?
Comment 5•4 years ago
|
||
The way I read bz's comment there is that this is how we decided to implement this initially without attaching much value to it. Evidently other browsers took a different route. Unfortunately for us web compatibility is aligned with them (as is the specification).
So it seems to me we should fix this and then add a comment to https://github.com/whatwg/html/issues/2210 saying that Firefox is now aligned with the specification, ideally with a pointer to new WPT tests. Hope that helps.
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Spec: https://html.spec.whatwg.org/#pragma-directives
When a meta element is inserted into the document, the
refresh steps should run if certain criteria is met.
Assignee | ||
Comment 7•4 years ago
|
||
Depends on D84545
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/885c9b25c9ff Process META elements when it's inserted r=smaug https://hg.mozilla.org/integration/autoland/rev/d6ead0115fc4 Update meta element related tests r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/24896 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Comment 11•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/885c9b25c9ff
https://hg.mozilla.org/mozilla-central/rev/d6ead0115fc4
Comment 12•4 years ago
|
||
I'm assuming this can ride the trains, feel free to reset status and request uplift otherwise.
Description
•