Search code examples
javascripthtmlmime-types

Correct type for source map files in script html tag


when including a javascript library, i use to ad the type="text/javascript" as an attribute to the html <script> tag, like this:

<script type="text/javascript" src="libs/js/underscore-min.js"></script>

I would like to know which one is the correct value to use when including a source map file like the one provided with the production version of underscore.js.

Thanks for your help!


Solution

  • Well, if for any reason you will need to include such type of file I would suggest you to use

    application/json
    

    Here is what guys from getbootstrap.com are doing:

    getbootstrap.com uses application/json for map files