Today while fixing some of the minor issues on Crunchify site, I noticed above error for each and every page.
I’m not sure when I started getting this error but I suspect, may be from beginning. Here is a complete error message:
Refused to execute script from 'https://crunchify.com/<post-name>/?cf_action=sync_comments&post_id=10276' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Let’s understand error first. It’s Chrome’s security standard not to execute which is not it meant to be.
Disqus WordPress plugin has a bug which downloading script as part of HTML MIME type. It should be JavaScript type.
How to fix this Disqus error?
Fix is very simple. We just have to add below statement to disqus.php
file. File is under /plugins/disqus-core
folder.
header(‘Content-Type: application/javascript
‘);
Just add above line, save file and you are all good. Try loading your page and error should go away. Let me know if you see any issues.