我们已经为我们的网站部署了新的SSL证书。我们注意到,如果以“ https”为前缀,则不会加载动态网页(来自mysql db的数据),与此同时,如果我们打开不带https的网页,则网页已正确加载(来自mysql db的数据被拉出并显示)。
With 'https'
https://somedomain.com/display.php?pageid=9
Without 'https' (plain http)
http://somedomain/display.php?pageid=9
可能是什么问题呢 ?
问题在于无法加载jquery库,因为它使用http而不是https,因此您的客户端代码均无法正常工作。
从萤火虫:
Blocked loading mixed active content "http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"
您应该像这样使用https加载jquery:
https://ajax.googleapis.com/ajax/libs/jquery/1.4.3
或像这样:
//ajax.googleapis.com/ajax/libs/jquery/1.4.3
并根据所访问的页面所使用的协议,将通过http或https加载库。
通常,一旦您切换到https,就应该通过https加载所有脚本,否则,它们将被视为安全漏洞而被阻止。
您可以在此处了解更多信息:为什么我突然在Firefox中遇到“阻止加载混合的活动内容”的问题?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句