Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 51475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:45:22+00:00 2026-05-10T16:45:22+00:00

What is the MIME type of javascript? More specifically, what is the right thing

  • 0

What is the MIME type of javascript?

More specifically, what is the right thing to put in the ‘type’ attribute of a script tag? application/x-javascript and text/javascript seem to be the main contenders.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:45:23+00:00Added an answer on May 10, 2026 at 4:45 pm

    This is a common mistake. The MIME type for javascript wasn’t standardized for years. It’s now officially: ‘application/javascript‘.

    The real kicker here is that most browsers won’t use that attribute anyway, at least not in the case of the script tag. They actually peek inside the packet and determine the type for themselves.

    So the bottom line is that the type=’text/javascript’ doesn’t do anything as far as the javascript is concerned, but it’s part of the spec for both HTML 4 and XHTML 1.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Why write <script type=“text/javascript”> when the mime type is set by the
I want to override the JSON MIME type (application/json) in Rails to (text/x-json). I
HTML: <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js type=text/javascript></script> <script src=/js/grabber.js type=text/javascript></script> <script type=text/javascript> $(document).ready(function() { $('#search-js').submit(function() { var
There are many "standards" for the JSON content type: application/json application/x-javascript text/javascript text/x-javascript text/x-json
I'm receiving a Resource interpreted as script but transferred with MIME type application/json error
I keep getting Resource interpreted as other but transferred with MIME type text/javascript. ,
What is MIME type of DLL that required to to set in following tag.
I have this in Nginx configuration files gzip_types text/plain text/html text/css application/json application/x-javascript text/xml
Can I get an image's file size and mime-type via JavaScript. I am writing
My REST API returns JSON. I'm currently returning text/plain as the MIME type, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.