Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    frameworkMessages.properties file not loading in Chrome

    SmartClient Version: v9.1p_2015-03-26/Pro Development Only (built 2015-03-26)
    Google Chrome Version 44.0.2403.155 m
    Windows 7


    Chrome is writing an error on the web console saying:
    Refused to execute script from ‘xxxxxxxx/smartclient/isomorphic/locales/frameworkMessages_zh_CN.properties' because its MIME type ('') is not executable, and strict MIME type checking is enabled.

    The error happens with any language of frameworkMesages.properties. To include this source on our page, we use the following code:

    Code:
    <script type=”text/javascript” src=”xxxxxxxxxx/frameworkMessages.properties”></script>
    After some research, it seems that chrome is doing strict MIME type checking because of the header “X-Content-Type-Options: nosniff”. From my understanding, it is not treating it as a JavaScript file because of the properties extension which has an unknown MIME type. The header is for security purposes so having that removed would not be favored. Could you please suggest a workaround?

    #2
    Perhaps too obvious to mention, but, set your options are to set the mime type to JavaScript (which you do in your Servlet container, not SmartGWT) or remove that security header for these particular files (also something you do in your Servlet container, not SmartGWT).

    Comment

    Working...
    X