When using the HTML <base>
tag together with the <style>
tag with Microsofts Edge Browser I experience a very strange issue. Here is a very simple reproducer:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Edge dev tools base tag 403 reproducer</title>
<base href="http://netdata.ch/dt/pp/"/>
<style type="text/css">
</style>
</head>
<body>
Hello!
</body>
</html>
http://netdata.ch/dt/pp/reproducer.html
This page produces the following errors in the console/networking tabs when using the developer tools:
A direct invocation of http://netdata.ch/dt/pp/ DOES return a 403. But why does Edge call this URL when using the developer tools? All other browser don't. There is no 403 in the server access logs if developer tools are not involved. So this is ok.
However, if I remove the <style>
tag the errors are gone:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Edge dev tools base tag 403 reproducer</title>
<base href="http://netdata.ch/dt/pp/"/>
</head>
<body>
Hello!
</body>
</html>
http://netdata.ch/dt/pp/ok.html
I could see this behaviour with:
Microsoft Edge 20.10240.16384.0
Microsoft Edge 38.14393.0.0
Any idea why this happens when the Edge developer tools are involved?
I would guess that Edge attempts to resolve images etc within the inline style tag from the base defined URL. as such it would need to resolve it for developer tools?