Technology?A site for testing the new tools I'm building, and a little talk about what I'm learning on the way. |
Javascript DOM Ready for SSL in IEWednesday, December 30, 2009 Many of the existing javascripts snippets you see on the internet to determine whether the DOM is fully loaded do not work properly in Internet Explorer when using the HTTPS secure protocol. The "normal" script is as follows and works great for HTTP but will throw unsecure item warnings in IE because it adds a script element to the page. Here is the updated script which works with both secure and unsecure connections: CommentsRez - Toronto, Ontario - Wednesday, March 02, 2011 9:29 PM Nicely done! How did you figure this out? Using "//:" is simply an empty protocol domain and port isn't it? I would have thought it would raise an error. Paul - San Jose, California - Thursday, March 31, 2011 6:23 PM Joshua - Thanks for this! Really saved my butt. Just curious though.. Is the check for https really necessary? Would there be a problem just setting the script src attribute to //: even for http?
|
Related Topics See Also |