The page at [url] ran insecure content from [url] in chrome

后端 未结 5 2076
梦谈多话
梦谈多话 2021-02-09 09:40

When i open a link this shows following message in chrome [blocked] The page at https://www.loadmytrailer.com/beta/postload.php ran insecure content from http://code.jquery.c

5条回答
  •  花落未央
    2021-02-09 09:54

    That's impossible. Chrome's security policy won't allow that.

    Option 1:

    Host the javascript you want to load remotely by yourself and link to it relatively.

    
    

    Requesting a resource on your own server is protocol-independent

    Option 2:

    Use CDN's that support SSL. (Google for example)

    
    

    A relative protocol notation can be used to request the source with the proper protocol depending on the protocol the current resource is using (see above).


    Side Note

    There is a command line parameter for Chrome called "-allow-running-insecure-content", which skips the insecure content check.

    I highly advise not to use it because you can't expect your users to have set that parameter.


    Further Reading

    • Google Chrome Help - "This page has insecure content"

提交回复
热议问题