Forums

Invisible in Chrome

I have this simple page

https://lemanrus.pythonanywhere.com/maps

which is visible in Chrome while I develop on my local instance of web2py. It's invisible in Chrome when served from pythonanywhere though the source comes down fine.

No problems with Opera or Firefox.

Any ideas?

Many Thanks

You're requesting insecure (i.e. non-HTTPS) content from within a HTTPS page - try accessing the page over standard HTTP and you'll probably find it works.

To track down problems like this, you can use Chrome's Javascript console (CTRL+SHIFT+J or choose from the Tools menu). You'll see an error like this:

[blocked] The page at https://lemanrus.pythonanywhere.com/maps ran insecure content from http://www.openlayers.org/api/OpenLayers.js.
Uncaught ReferenceError: OpenLayers is not defined maps:16

It's pretty clear from that message that the download of the Javascript file is being blocked for security reasons, and therefore the content of it isn't defined when the page attempts to call it.

Presumably it works in other browsers because they have slightly different security policies.

Not much to add here. Other than if you can request the secondary resource over https then it should work in both locations.

@hansel: Yes, except that unfortunately openlayers.org doesn't seem to support SSL, at least for that URL.

I guess I can't blame them since they're presumably a free service and SSL is quite a burden on CPU-limited sites. I've found in the past when load testing that it reduces the maximum request load by at least an order of magnitude, often two. Newer CPUs have instructions to accelerate AES, but for small documents like that then the initial RSA handshake is the real performance hog - typically I think you need dedicated SSL acceleration cards for that.

Thank you for the clear explanation