[wp-hackers] Changing mime type of Javascript
John Blackbourn
johnbillion+wp at gmail.com
Wed Apr 4 15:00:23 UTC 2012
On 4 April 2012 15:22, Phillip Lord <phillip.lord at newcastle.ac.uk> wrote:
>
> I need to change a mime type from "text/javascript" to "text/javascript;
> ex4=1". This is to get some javascript working without error in IE9 and
> at all in IE8. Unfortunately, the javascript library which requires this
> is outside of my control.
Out of interest, Googling for anything relating to JavaScript and ex4
in the mime type brings up very few relevant results, none of which
explain its use, and just three code examples of that particular mime
type attribute on the entire web. From that I can deduce that your
method of fixing the bug that you're encountering is probably best
solved another way. It seems to me that fixing a JavaScript bug by
changing the mime type is not the right way to go about it. Could you
provide a link to an article explaining the use of this mime type?
> I've wp_enqueue_scripts to add the scripts in the first place. As far as
> I can tell Wordpress will not let me fiddle around script tags that are
> generated, but I thought I would ask.
The script dependency system in WordPress hard-codes the mime type to
"text/javascript", so no, you can't change this by way of a filter or
an argument currently.
More information about the wp-hackers
mailing list