Description
When a web page https://example.com/page
has the following content, what should the meta refresh target be for each case?
case 1
<base target="subdir/">
<meta http-equiv="refresh" content="0; url=target.html">
In Firefox 94, it's https://example.com/target.html
.
In Chromium 95, it's https://example.com/subdir/target.html
.
case 2
<meta http-equiv="refresh" content="0; url=target.html">
<base target="subdir/">
In Firefox 94, it's https://example.com/target.html
.
In Chromium 95, it's https://example.com/target.html
.
case 3
<meta http-equiv="refresh" content="1; url=target.html">
<base target="subdir/">
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.