iron icon indicating copy to clipboard operation
iron copied to clipboard

Script tag with mismatching mime-type/file-extension seems to work!

Open jschementi opened this issue 15 years ago • 1 comments

When a script tag has a mismatching mime-type/file-extension, preference is given to the file-extension. See Tests/tests.html

jschementi avatar Sep 19 '09 19:09 jschementi

This is not the case. Here is the line in question:

<script type="text/python" src="rblib/python.rb"></script>

Because external script-tags are not immediately run (defer defaults to true), the Python engine is loaded, the script is downloaded, but it is not run. Since it's already downloaded, another Ruby scrip can require it.

This leads me to believe that "defer=true" as default is wrong; it should stay as much like JavaScript as possible.

jschementi avatar Oct 12 '09 21:10 jschementi