Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text/javascript is the "correct" Static Files MIME Type #3614

Closed
RehanSaeed opened this issue Oct 11, 2018 · 3 comments
Closed

text/javascript is the "correct" Static Files MIME Type #3614

RehanSaeed opened this issue Oct 11, 2018 · 3 comments
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware feature-static-files

Comments

@RehanSaeed
Copy link
Contributor

I noticed this change when I got a warning while trying out Sonar. Apparently the standards bodies have changed their minds:

This is a breaking change. I raised PR aspnet/StaticFiles#220 but it was closed without a reason given for why.

@poke
Copy link
Contributor

poke commented Oct 11, 2018

As per RFC 4329 and the IANA, text/javascript is still considered obsolete and replaced by application/javascript. If there is movement to change this by the WHATWG then that’s one thing but I would personally still consider the IANA to be the proper authority for these decisions.

At the very least, the current status is disputed, so changing something now would be the worse thing to do. We should wait until there is a definitive decision on this that all involved parties agree on.

The change is currently tracked by this draft RFC.

@RehanSaeed
Copy link
Contributor Author

This post from Sonarwhal which recommended text/javascript is what prompted my issue and PR:

webhintio/hint#568 (comment)

@shirhatti
Copy link
Contributor

Closing as a dupe of #3099

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware feature-static-files
Projects
None yet
Development

No branches or pull requests

6 participants