Closed GoogleCodeExporter closed 8 years ago
As interesting as traffic logs can be, I'd be much more interested in actual
code that demonstrates the issue, just to safely remove any other possible
explanation.
Whatever is going on here sure looks weird.
Original comment by aubourg.julian
on 30 Nov 2010 at 11:05
Sorry, forgot that. Tomorrow from the office. Believe me, it's just the very
basic usage of the lib but I will provide the code tomorrow (GMT).
Original comment by foldi.pe...@gmail.com
on 30 Nov 2010 at 11:17
Calling code attached. I don't believe that it matters but it's in a jquery
plugin, I included the surrounding code too.
Original comment by foldi.pe...@gmail.com
on 1 Dec 2010 at 10:19
Attachments:
Any idea? What I found strange in the logs I attached is that the default
jquery.ajax request is a XMLHttpRequest, but the jquery docs says that:
"[error] This handler is not called for JSONP requests, because they do not use
an XMLHttpRequest." This doesn't answer why the jsonp sends 3 requests by call,
but it's strange and maybe gives some hints to somebody who understands these
things more than I do.
Original comment by foldi.pe...@gmail.com
on 2 Dec 2010 at 11:31
Yeah, this XMLHttpRequest reference is bugging me.
It's nice of you to have included the call to the plugin but I'm afraid we'll
need a little more context here.
Original comment by aubourg.julian
on 2 Dec 2010 at 11:49
OK. Spent the past 3 hours to localize the issue. You won't be happy :). I hope
you can reproduce it. Attached is my source. When I remove the img in the 8th
line, there is just 1 request, when it has the img line I have 3 requests.
Also attached the headers of the good request and the 3 "bad" requests.
Don't forget: this just happens when the server is not the localhost.
Original comment by foldi.pe...@gmail.com
on 2 Dec 2010 at 3:05
Attachments:
nothing? :( Can you reproduce it?
Original comment by foldi.pe...@gmail.com
on 8 Dec 2010 at 7:41
No, actually, I can't.
Seeing your code I'd suggest one thing though: put the script in the head of
your document. If your success and error callbacks actually modify the DOM,
then use jQuery's DOM Readyness detection. Something along the lines of:
$.jsonp({
success: function( data ) {
$( function() {
// Actual code
} );
}
})
That's the only thing bothering me in your code actually. That and the fact you
use the type & dataType options which have no effect in jsonp (dataType is
always "jsonp" and type is ALWAYS "GET").
Original comment by aubourg.julian
on 9 Dec 2010 at 12:01
Any news?
Original comment by jul...@creative-area.net
on 12 Dec 2010 at 2:03
Closing as invalid.
Original comment by jul...@creative-area.net
on 4 Jan 2011 at 1:23
Original issue reported on code.google.com by
foldi.pe...@gmail.com
on 30 Nov 2010 at 9:07Attachments: