Skip to main content

Bug Tracker

Side navigation

#10175 closed bug (invalid)

Opened August 31, 2011 08:47AM UTC

Closed June 26, 2012 02:54AM UTC

$.getJSON() with url '/' doesn't work in IE

Reported by: jbruler@inbox.ru Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.6.2
Keywords: Cc: jaubourg
Blocked by: Blocking:
Description
$.getJSON('/', function(){alert('ok');})

This code doesn't work in IE (version 8, 9). It doesn't send any request to server. In other browsers (firefox, opera, chrome) it work properly. I test it with jQuery 1.4.2 and 1.6.2 with same result.

Attachments (0)
Change History (6)

Changed August 31, 2011 09:02AM UTC by jbruler@inbox.ru comment:1

Little mistake, code looks like this:

$.getJSON('/', data, function(){alert('ok');})

Changed September 02, 2011 11:16AM UTC by addyosmani comment:2

_comment0: Confirmed: http://jsfiddle.net/GEJwe/ (and there's a workaround in there using '//') however, I need to discuss with the rest of the group as to whether this is simply expected (but undocumented) behaviour. 1314966524483267
component: unfiledajax
priority: undecidedlow
status: newopen

Confirmed: http://jsfiddle.net/GEJwe/ (and there's a workaround in there using

$.getJSON('//', function(){alert('ok');})

however, I need to discuss with the rest of the group as to whether this is simply expected (but undocumented) behaviour.

Changed September 02, 2011 12:42PM UTC by addyosmani comment:3

Further investigation: http://jsfiddle.net/Ga9sB/. So this works fine with cache:false using the complete $.ajax call but not with getJSON. dmethvin and I are investigating.

Changed September 14, 2011 09:10AM UTC by jaubourg comment:4

Now that's weird. You guys found something more or do you want me to hop in and see how we can fix this for 1.7?

Changed December 09, 2011 01:39AM UTC by addyosmani comment:5

cc: → jaubourg

@jaubourg if you can hop in and see if this is still an issue that would be great.

Changed June 26, 2012 02:54AM UTC by dmethvin comment:6

resolution: → invalid
status: openclosed

In IE8 and IE9 I can see the browser making the request. It doesn't alert because the response isn't a valid JSON response (at least for me). As the docs say, a bad response often/usually fails silently.