Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java script blocked due to MIME type error

Status
Not open for further replies.

MDGarcia

Programmer
Oct 7, 2004
64
PR
Good day.

We're migrating Lotus Notes 8.5 applications to version 11. The legacy application I'm working on executed with no problems in browsers link Edge, IE, Chrome and Firefox. The application in the new version is giving the following error:

Firefox: The resource from “lotusappsvr>/requisition.nsf/script_global.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Chrome: Refused to execute script from 'lotusappsvr>/requisition.nsf/script_global.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

A colleague has the same situation and have tried different solutions, including settings of the compatibility mode in the browsers. Another solution found was exactly what the code my application is using.

Code:
Form HTML Head Content

db:=@Subset(@DbName;-1);
"<script src=\"/" + db + "/script_global.js\"></script>"

db is used in other forms as Dim db As NotesDatabase

Thank you.

M. Garcia
Senior Programmer Analyst
Puerto Rico
 

My first guess is that the script_global.js is not JavaScript, but may contain JSON. In that case, you'd have to add
type="application/json" to the <script> tag to indicate the content is not executable.


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Good day.

I made the change but is not producing the data to list. I'm checking with another developer with the same issue (and more experienced) to see if your resolution works.

Thanks for answering.

M. Garcia
Senior Programmer Analyst
Puerto Rico
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top