Search code examples
javascriptasp.nethttpsgoogle-gadget

How to enable the google free widgets to work with https?


I use Google free gadgets in my web site .

every thing goes okay when my web application use http. if i use https then these widgets don't appear at all .


Is there some configuration to allow the widgets to appear through secure http


I embed code like the following in my web page :

<script src="//www.gmodules.com/ig/ifr?url=http://www.gstatic.com/ig/modules/datetime_v2/kennedy/datetime_v2.xml&amp;up_color=grey&amp;up_dateFormat=wmd&amp;up_firstDay=0&amp;up_clocks=%5B%5D&amp;up_mainClock=&amp;up_mainClockTimeZoneOffset=&amp;up_mainClockDSTOffset=&amp;up_24hourClock=true&amp;up_showWorldClocks=true&amp;up_useServerTime=false&amp;synd=open&amp;w=320&amp;h=160&amp;title=__MSG_title__&amp;lang=en&amp;country=ALL&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>

Solution

  • I find that if I make the following change it works for me on my server:

    <script src="//www.gmodules.com/i.... etc.
    

    put http: in front of the //

    <script src="http://www.gmodules.com/i.... etc.
    

    Of course using this method you will lose the 'magic' that src="// provides. AND, there may be warnings about non SSL content on the secure page.

    EDIT:

    Doing a little more digging, it appears that the SSL certificate for gmodules.com is untrusted and a secure connection cannot be made. The link proffered by Joe leads to the 2009 article dealing with a similar issue.

    I think this is something to be fixed by google. Any work-around that I can think of seems way over the top for a gadget. Failing google putting a valid certificate on their website or hosting this service on a google.com domain not sure they is much that can be done.