1

I'm using Cordova 4 with Cross-walk and on android it throws the 'Resource interpreted as Script but transferred with MIME type text/plain' error for all plugins' javascript files.

I have already added the Whitelist plugin and added the following to my index.html file:

<meta http-equiv="Content-Type" content="application/javascript; charset=UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * &apos;unsafe-inline&apos;; script-src * &apos;unsafe-inline&apos; &apos;unsafe-eval&apos;">

and these to the config.xml

  <allow-navigation href="*"/>
  <allow-intent href="*"/>
Kash Pourdeilami
  • 488
  • 2
  • 6
  • 24
  • possible duplicate of [Chrome says "Resource interpreted as script but transferred with MIME type text/plain.", what gives?](http://stackoverflow.com/questions/3467404/chrome-says-resource-interpreted-as-script-but-transferred-with-mime-type-text) – Mark Veenstra Jun 16 '15 at 17:24
  • This is not a duplicate; Cordova is often used to load local files with `file://` URLs, so configuring the server is not possible. – Thomas May 15 '21 at 09:10

1 Answers1

4

I believe those are not 'real' errors and Chrome specific: see this SO answer

Community
  • 1
  • 1
Mark Veenstra
  • 4,691
  • 6
  • 35
  • 66
  • 1
    Yep. Also @Khashayar.P Be sure you have type="text/javascript" on your script tags. I've found that helps reduce the warnings. – agmcleod Jun 16 '15 at 17:30