JavaScript error due to mixing HTTP and HTTPS content

Avatar

Brant Gurganus

2 months ago

When logged in, the site uses HTTPS. Most browsers try to get you not to mix HTTP and HTTPS content, and in that scenario, things like the Google maps don't show and you get JavaScript errors like:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET CLR 4.0.20506) Timestamp: Tue, 8 Sep 2009 11:20:17 UTC

Message: 'GClientGeocoder' is undefined Line: 289 Char: 3 Code: 0 URI: https://www.ohloh.net/javascripts/main.js?1251390470


Avatar

Benjamin Sonntag

9 days ago

Hi,

In a more general way, no need of javascript to make the ohloh website behave as a bad guy with any browser : eg: https://www.ohloh.net/p/alternc has a google map with an http url, so any browser will tell that the page is not secured.

You should detect http|https and call google maps accordingly


Avatar

Brant Gurganus

8 days ago

Loading Google Maps over http on an https page is about as secure as not using https at all. It gives a channel for content not from Google Maps to enter since you can't ensure the content comes from the real Google Maps.


Avatar

Benjamin Sonntag

8 days ago

Yes, that's why ohloh need to use https for the google maps when they serve an https page on ohloh.net ...

or don't use https at all :)