Open danny0838 opened 2 years ago
So the "shared declarative refresh steps" algorithm runs when the meta
element is inserted. In step 11.11 of that algorithm it parses the URL relative to the document (that ends up using the current base URL). Later that URL is used to navigate, potentially after a delay.
That would mean that Chrome is correct for case 1 and Firefox for case 3.
Would you be willing to create web-platform-tests for these scenarios?
What do you mean "create web-platform-tests"?
See https://github.com/web-platform-tests/wpt. It's a project that hosts cross-browser tests to foster interoperability between browsers.
Sorry. Not familiar with that. Maybe some long long long future day...
Another resolution difference:
<meta http-equiv="refresh" content="0; url=/target.html">
Opening the local file path in the browser (instead of via a web server):
Firefox 128: ignores/rejects the redirect
Edge 126 (Chromium) redirects to localDirContainingThePage/target.html
Opening the page in a web server.
Firefox 128: ignores/rejects the redirect
Edge 126 (Chromium) redirects to https://example.com/target.html
When a web page
https://example.com/page
has the following content, what should the meta refresh target be for each case?case 1
In Firefox 94, it's
https://example.com/target.html
.In Chromium 95, it's
https://example.com/subdir/target.html
.case 2
In Firefox 94, it's
https://example.com/target.html
.In Chromium 95, it's
https://example.com/target.html
.case 3
In Firefox 94, it's
https://example.com/target.html
.In Chromium 95, it's
https://example.com/subdir/target.html
.It seems that Firefox resolves a meta refresh using the initial base URL.
Chromium resolves a meta refresh using the current base URL. However, if the time of a meta refresh is 0, Chromium resolves the meta refresh at the time the tag is loaded, and, as a result, all following
<base>
s are not taken into account.What is the expected behavior by the web standard? I have read https://html.spec.whatwg.org/#attr-meta-http-equiv-refresh, but failed to understand what should happen in such cases.