9

I have a fairly simple Angular 1.x app that was working fine until i upgraded to Safari 11. Now, it doesn't work because almost all of the js files are blocked.

The same was true for CSS files, but removing the "rel" attribute and adding type="text/css" fixed the CSS issues.

For the JS files, I've made sure to add type="text/javascript" to the script tags. I also just tried adding ./ to the beginning of the src's for giggles and they still won't load.

Does anyone know how to fix this?

Thanks, Wayne

3
  • Is the server not setting the correct types? Commented Nov 14, 2017 at 14:34
  • I'm testing the app locally using nam live-server. It's worked fine until Safari update Commented Nov 14, 2017 at 14:47
  • I just noticed a typo in my prior comment. I meant npm live-sever. Commented Jul 25, 2018 at 13:57

2 Answers 2

16

I want to just delete the question but I hope maybe this answer will still be helpful to someone.

So, my problem was actually that I had a bad clone of my project and it was missing files!

However, for anyone having the same issue:

ensuring that type="text/css" for stylesheets and type="text/javascript" did fix the issue. (for the files that actually existed)

Sign up to request clarification or add additional context in comments.

Comments

0

Please make sure that a response header with the name X-Content-Type or X-Content-Type-Optionas has the text/javascript value instead of nosniff.

It is simple to make a workaround locally using Charles Proxy Rewrite tool

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.