Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)

后端 未结 14 871
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 11:53

I am developing a web page using JavaScript and HTML, everything was working good when I have received this list of errors from my HTML page:



        
相关标签:
14条回答
  • 2020-12-13 12:37

    For Wordpress

    In my case i just missed the slash "/" after get_template_directory_uri() so resulted / generated path was wrong:

    My Wrong code :

    wp_enqueue_script( 'retina-js', get_template_directory_uri().'js/retina.min.js' ); 
    

    My Corrected Code :

    wp_enqueue_script( 'retina-js', get_template_directory_uri().'/js/retina.min.js' );
    
    0 讨论(0)
  • 2020-12-13 12:37

    See for the protocols HTTPS and HTTP

    Sometimes if you are using mixed protocols [this happens mostly with JSONP callbacks ] you can end up in this ERROR.

    Make sure both the web-page and the resource page have the same HTTP protocols.

    0 讨论(0)
提交回复
热议问题