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

[Bug] Should recommend text/javascript and not application/javascript #4946

Open
laukstein opened this issue Dec 9, 2021 · 2 comments
Open
Labels

Comments

@laukstein
Copy link

Hints shows Content-Type error

'content-type' header media type value should be 'application/javascript', not 'text/javascript'.

grabilla g15736

pointing to article https://webhint.io/docs/user-guide/hints/hint-content-type/#a-note-about-applicationjavascript saying totally opposite

This hint recommends using a Content-Type of text/javascript for JavaScript resources as noted in the HTML standard.

@captainbrosset
Copy link
Contributor

Related: #2621
Funny how confusing this content-type can be! Even webhint doesn't agree with itself about it 😁

@antross can you help shade some light on which is correct here, the docs or the hint?

@antross
Copy link
Member

antross commented Feb 16, 2022

@captainbrosset, per #2621 we should be allowing either, so something's definitely gone awry 🤔 I'm wondering if we picked up a dependency update that altered this (though it should have been caught by tests in theory).

Thanks for the report @laukstein - we'll see if we can figure out what's up. In the meantime, if you have a live URL we can repro this on that'd be helpful (otherwise we'll try to set up a test page later).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants