Opened 12 years ago
Closed 11 years ago
#10175 closed bug (invalid)
$.getJSON() with url '/' doesn't work in IE
Reported by: | 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.
Change History (6)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | unfiled → ajax |
---|---|
Priority: | undecided → low |
Status: | new → open |
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.
comment:3 Changed 12 years ago by
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.
comment:4 Changed 12 years ago by
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?
comment:5 Changed 12 years ago by
Cc: | jaubourg added |
---|
@jaubourg if you can hop in and see if this is still an issue that would be great.
comment:6 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | open → closed |
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.
Little mistake, code looks like this: