2015-06-16 28 views
0

我使用科爾多瓦4與跨行走和Android它引發'資源解釋爲腳本,但與MIME類型文本/純傳輸'錯誤爲所有插件的JavaScript文件。科爾多瓦插件錯誤:資源解釋爲腳本,但與MIME類型傳輸文本/純

我已經添加白名單插件,並增加了以下我index.html文件:

<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;"> 

這些到config.xml

<allow-navigation href="*"/> 
    <allow-intent href="*"/> 
+0

可能重複的[Chrome說:「資源解釋爲腳本,但與MIME類型文本/平原傳輸」,什麼給?](http://stackoverflow.com/queue sints/3467404/chrome-say-resource-interpre-as-script-but-transferred-with-mime-type-text) –

回答

3

我相信那些不「真實'錯誤和Chrome的具體情況:看到這個SO answer

+1

是的。另外@ Khashayar.P確保你的腳本標籤上有type =「text/javascript」。我發現這有助於減少警告。 – agmcleod

相關問題