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
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
Share Improve this question asked Nov 14, 2017 at 14:32 Wayne KaskieWayne Kaskie 3,4835 gold badges35 silver badges50 bronze badges 3- Is the server not setting the correct types? – epascarello Commented Nov 14, 2017 at 14:34
- I'm testing the app locally using nam live-server. It's worked fine until Safari update – Wayne Kaskie Commented Nov 14, 2017 at 14:47
- I just noticed a typo in my prior comment. I meant npm live-sever. – Wayne Kaskie Commented Jul 25, 2018 at 13:57
2 Answers
Reset to default 16I 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)
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