0

From what I've read, the MIME content-type text/javascript is obsolete and has been superseded by application/javascript. If that's the case, why does Google serve analytics.js as the former?

enter image description here

Just checking a site I own, and it also seems to be serving JS content as text/javascript, too. (I just had to add AddOutputFilterByType DEFLATE text/javascript to my .htaccess, because application/javascript wasn't working.)

Is this just a case of IANA guidelines not really being adhered to in the real world?

Community
  • 1
  • 1
Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
  • See the comments on the linked question's answers. Obsolete browsers need `text/javascript`. It's also the second-shortest of the [valid JavaScript MIME types](https://mimesniff.spec.whatwg.org/#javascript-mime-type) (and I don't see Google choosing to use the shortest one, a MIME type that used to be Microsoft-specific). – T.J. Crowder Apr 23 '18 at 13:37
  • @T.J.Crowder The "duplicate's" single answer is the same as my question. Hardly a duplicate. Also, the question itself is a duplicate. You should not use duplicate questions to close posts you believe are duplicates. – Chuck Le Butt Apr 23 '18 at 14:10
  • @T.J.Crowder Did you tag the wrong question as a duplicate perhaps? – Chuck Le Butt Apr 23 '18 at 14:16
  • Again: Read the comments on the answer (and the comment above). (And there's no prohibition against using a duplicate as a duplicate, if it's useful to do so -- as it is here. If there were, the site would prevent it.) – T.J. Crowder Apr 23 '18 at 14:17

0 Answers0