JavaScript files blocked because of MIME type mismatch
Having trouble installing Oxygen XML WebHelp? Got a bug to report? Post it all here.
-
- Posts: 474
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
JavaScript files blocked because of MIME type mismatch
Post by Frank Ralf »
Hi,
One of our customers delivers the Oxygen WebHelp output via a WordPress site. However, all the JavaScript from the WebHelp is blocked by the browser with the following error message:
The resource from “https://docs.mydomain.de/pub/setclip/ah ... 2024041900” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).
According to Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff) this is because the server sets the content type of the JavaScript files to text/plain instead of text/javascript. Is this something that can be fixed on WebHelp level? Or is this a server configuration?
Best regards,
Frank
EDIT
Looks as if the script tags that include the JavaScript files are missing the type-attribute compared to the CSS files:
One of our customers delivers the Oxygen WebHelp output via a WordPress site. However, all the JavaScript from the WebHelp is blocked by the browser with the following error message:
The resource from “https://docs.mydomain.de/pub/setclip/ah ... 2024041900” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).
According to Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff) this is because the server sets the content type of the JavaScript files to text/plain instead of text/javascript. Is this something that can be fixed on WebHelp level? Or is this a server configuration?
Best regards,
Frank
EDIT
Looks as if the script tags that include the JavaScript files are missing the type-attribute compared to the CSS files:
Code: Select all
<script src="./oxygen-webhelp/app/options/properties.js"></script>
<link rel="stylesheet" type="text/css" href="./oxygen-webhelp/app/main.css" />
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 36
- Joined: Fri Jan 22, 2021 11:05 am
Re: JavaScript files blocked because of MIME type mismatch
Post by beniamin_savu »
Hi,
Thank you for your feedback!
Please note that omitting the type attribute indicates that the script is considered a classic script, interpreted as JavaScript. For more details on the type attribute, refer to the following sources: :
* https://html.spec.whatwg.org/multipage/ ... cript-type
* https://developer.mozilla.org/en-US/doc ... _mime_type
Setting the MIME type for a file is most likely associated with the server configuration settings. Unfortunately we don't think it can be adjusted directly from WebHelp.
Best regards,
Beniamin Savu
Oxygen WebHelp Team
http://www.oxygenxml.com
Thank you for your feedback!
Please note that omitting the type attribute indicates that the script is considered a classic script, interpreted as JavaScript. For more details on the type attribute, refer to the following sources: :
* https://html.spec.whatwg.org/multipage/ ... cript-type
* https://developer.mozilla.org/en-US/doc ... _mime_type
Setting the MIME type for a file is most likely associated with the server configuration settings. Unfortunately we don't think it can be adjusted directly from WebHelp.
Best regards,
Beniamin Savu
Oxygen WebHelp Team
http://www.oxygenxml.com
-
- Posts: 474
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: JavaScript files blocked because of MIME type mismatch
Post by Frank Ralf »
Thanks for your quick reply!
Best regards,
Frank
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 474
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: JavaScript files blocked because of MIME type mismatch
Post by Frank Ralf »
The customer changed the server settings to recognize JS files in addition to HTML and CSS and now it works.
Best regards,
Frank
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service