I am running magento 2.1.5 and every thing was working fine. Suddenly my CSS and Js files are not loading I am getting error
http://mymagentourl.com/pub/static/version1491202457/frontend/Magento/luma/en_US/css/styles-m.css" was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).
what is the meaning of was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).
I am running magento in nginx Web Server and my mode is production. I tried
- remove Var/* folder
- re deploy static content
- remove cache
- flush cache
I am not able to understand why my css and js is not loading?
asked Apr 3, 2017 at 7:03
Priyank
7,7627 gold badges39 silver badges70 bronze badges
-
It looks like the same problem: magento.stackexchange.com/questions/152625/…Nikola– Nikola2017年04月03日 07:14:21 +00:00Commented Apr 3, 2017 at 7:14
-
Possible but there is no accepted solution moreover I tried those too. @NikolaPriyank– Priyank2017年04月03日 07:16:55 +00:00Commented Apr 3, 2017 at 7:16
-
there is something wrong in nginx rewrite.MagenX– MagenX2017年04月04日 16:43:39 +00:00Commented Apr 4, 2017 at 16:43
-
it was working well before and there has been no changes after then.Priyank– Priyank2017年04月05日 04:44:45 +00:00Commented Apr 5, 2017 at 4:44
1 Answer 1
Navigate to your database and perform following steps:-
- Find core_config_data table and open it.
- Add a new row and provide "dev/static/sign" under path and "0" under value (without quotes) and leave other fields unchanged and save it.
- flush cache
php bin/magento cache:flush - perform static content deploy
php bin/magento setup:static-content:deploy
answered Apr 3, 2017 at 8:12
Vivek Kumar
5,7932 gold badges26 silver badges55 bronze badges
-
Ya had that solution in mind and done that but this removes the dynamic generation of static file url of version which is removed. So is this ok?Priyank– Priyank2017年04月03日 08:34:08 +00:00Commented Apr 3, 2017 at 8:34
-
Please let me know about your server environment (linux or windows) and if the problem is browser depended or not.Vivek Kumar– Vivek Kumar2017年04月03日 09:22:12 +00:00Commented Apr 3, 2017 at 9:22
-
Linux with nginx web server no its not browser dependent.Priyank– Priyank2017年04月04日 04:52:45 +00:00Commented Apr 4, 2017 at 4:52
default