witho...">Geek asks and answersShould the external js file contain the .js extension?Can i use <script type="text/javascript" src="http://example.com/file"></script>without .js at the end of the source?+3javascriptAlex May 08 '11 at 4:00source share1 answerYes, it’s okay to omit .jsit if your server is configured to handle this and will serve this URI with 200 OKand Content-Type: text/javascript.+8icktoofay May 08 '11 at 4:01source shareMore articles:Java - reflection to get a generic method type - javaЭкземпляры класса "владеют" экземплярами TMultiReadExclusiveWriteSynchronizer? - multithreadingWarning doesn't work in Rails / ajax situation? - ajaxКак я могу использовать YAML в JRuby в версии 1.9 с помощью Syck? - rubyUsing regex in Perl, how do I find the first occurrence of any letter? - regexRead file contents in unknown size - cExtensions and libraries for Django - pythonUndefined symbols for x86_64 architecture: "_ glutInit" referenced: _main in main.o / Netbeans on Mac - netbeansWPF High Resolution Issues - dpiMulti-stylesheet with jQuery cookies (pop-up issue) - jqueryAll Articles
Can i use <script type="text/javascript" src="http://example.com/file"></script>
<script type="text/javascript" src="http://example.com/file"></script>
without .js at the end of the source?
Yes, it’s okay to omit .jsit if your server is configured to handle this and will serve this URI with 200 OKand Content-Type: text/javascript.
.js
200 OK
Content-Type: text/javascript