Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update lib/transports/jsonp-polling.js - IE6 error popup while on https; #515

Closed
wants to merge 1 commit into from

2 participants

Edgar Alves da Mota Veiga Guillermo Rauch
Edgar Alves da Mota Veiga

Hello!

I was having some issues with the jsonp fallback, while on Internet Explorer 6. 
This was happening when the origin request was secure (https), IE6 kept displaying
the message "This page contains both secure and nonsecure items...".

With a little research I found this commit in another project, whose the main
purpose was to fix this error: cowboy/jquery-bbq@f276cef

I've forked, updated socket.io-client code with the fix and it worked.

Here's my contribution.

Edgar Alves da Mota Veiga eveiga Update lib/transports/jsonp-polling.js
Hello!

I was having some issues with the jsonp fallback, while on Internet Explorer 6. 
This was happening when the origin request was secure (https), IE6 kept displaying
the message "This page contains both secure and nonsecure items...".

With a little research I found this commit in another project, whose the main
purpose was to fix this error: cowboy/jquery-bbq@f276cef

I've forked, updated socket.io-client code with the fix and it worked.

Here's my contribution.
729d1aa
Edgar Alves da Mota Veiga eveiga referenced this pull request in Automattic/engine.io-client
Closed

JSONP problem while on IE6 & https #100

Guillermo Rauch
Owner

Wow nice fix.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 1, 2013
  1. Edgar Alves da Mota Veiga

    Update lib/transports/jsonp-polling.js

    eveiga authored
    Hello!
    
    I was having some issues with the jsonp fallback, while on Internet Explorer 6. 
    This was happening when the origin request was secure (https), IE6 kept displaying
    the message "This page contains both secure and nonsecure items...".
    
    With a little research I found this commit in another project, whose the main
    purpose was to fix this error: cowboy/jquery-bbq@f276cef
    
    I've forked, updated socket.io-client code with the fix and it worked.
    
    Here's my contribution.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/transports/jsonp-polling.js
5 lib/transports/jsonp-polling.js
View
@@ -1,4 +1,3 @@
-
/**
* socket.io
* Copyright(c) 2011 LearnBoost <dev@learnboost.com>
@@ -113,10 +112,11 @@
try {
// ie6 dynamic iframes with target="" support (thanks Chris Lambacher)
- iframe = document.createElement('<iframe name="'+ self.iframeId +'">');
+ iframe = document.createElement('<iframe src="javascript:0" name="'+ self.iframeId +'">');
} catch (e) {
iframe = document.createElement('iframe');
iframe.name = self.iframeId;
+ iframe.src = "javascript:0";
}
iframe.id = self.iframeId;
@@ -181,6 +181,7 @@
if (indicator) {
setTimeout(function () {
var iframe = document.createElement('iframe');
+ iframe.src = "javascript:0";
document.body.appendChild(iframe);
document.body.removeChild(iframe);
}, 100);
Something went wrong with that request. Please try again.