Created
April 2, 2012 18:29
-
-
Save 3emad/2286103 to your computer and use it in GitHub Desktop.
Chrome developer tool bug[network tab]: Double ajax post previewed is repeated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* showed in chrome network posted the same value and returned the same response | |
* the following code will call action "getBar" twice | |
* $.post("example.com",{action:'getFoo'},function(data){},"json"); | |
* $.post("example.com",{action:'getBar'},function(data){},"json"); | |
* | |
* in google chrome network tab, it will show that getFoo is ignored and getBar was called twice, though | |
* the object response are correct on the javascript end. | |
* | |
* work around to this bug: | |
*/ | |
$.post("example.com?foo",{action:'getFoo'},function(data){},"json"); | |
$.post("example.com?bar",{action:'getBar'},function(data){},"json"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment