Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#29196 closed enhancement (fixed)

Set the MIME-Types of JS files to application/javascript

Reported by: sergejmueller's profile sergej.mueller Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.2 Priority: normal
Severity: normal Version: 3.9
Component: Script Loader Keywords: has-patch
Focuses: javascript Cc:

Attachments (1)

trunk.patch (2.8 KB) - added by sergej.mueller 10 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
10 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from feature request to enhancement
  • Version changed from trunk to 3.9

Looks good to me.

text/javascript is obsolete, application/x-javascript was experimental. application/javascript is the recommended type per RFC 4329.

However, application/javascript is not accepted in IE8 or earlier (per Wikipedia), not sure if that's an issue for us (technically we still support IE7).

Last edited 10 years ago by SergeyBiryukov (previous) (diff)

#2 @wonderboymusic
10 years ago

  • Milestone changed from Future Release to 4.2

#3 @wonderboymusic
10 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 31029:

When outputting JS with a Content-Type header:

text/javascript is obsolete, application/x-javascript was experimental. application/javascript is the recommended type per RFC 4329.

Props sergej.mueller.
Fixes #29196.

Note: See TracTickets for help on using tickets.