Is a .js file a strict requirement for JavaScript link pages? I did not encounter problems with IE6,7,8 and FF3.5 when testing, but wanted to confirm. I have an architectural constraint that leads me to this question.
I didn’t think so, but if this gives you problems, just add the query string ending in ".js" to your url ...
<script src="/scripts/myscript.weirdextension?dummy=myscript.js"></script>
This is not required. I see many .php files that are script tag sources.
, mime application/x-javascript, .
application/x-javascript
A quick test shows that Google Chrome will allow the wrong mime type, causing a warning to the console. Internet Explorer might be a little stricter.
You must specify the 'type' property of the 'script' tag or pass the Content-type: application / x-javascript header from the server. There is no limit to the file name.
Source: https://habr.com/ru/post/1756630/More articles:How to insert a new div that surrounds existing elements - javascriptCheck driver license numbers? - jqueryHow to run a URL behind the scenes without displaying it in a browser? - c #avrdude and atmega48pa - avrIn IIS, how to set environment variables for specific CGI scripts - windowsRandomly thrown IO exceptions in C # - c #Программно добавить изображение в файл PowerPoint - powerpoint-vbaIs it a bad practice to access a data item directly? - language-agnosticАвтоматический способ загрузки нескольких изображений в PowerPoint на разных страницах? - ms-officeJQuery UI modal dialog form using remote content - javascriptAll Articles