Created
September 12, 2012 00:41
-
-
Save sdesai/3703317 to your computer and use it in GitHub Desktop.
Basic Repro for IE10 Loader/Get Issue
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
<!doctype html> | |
<html> | |
<head> | |
<title>YUI Get Tests</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="http://yui.yahooapis.com/3.7.0pr2/build/yui/yui.js"></script> | |
<script type="text/javascript"> | |
// It's all about mixing 304/200s and JS/CSS | |
// Steps to repro: | |
// | |
// 1. Clear cache (use browser clear cache, not dev tools clear cache). | |
// 2. Load page once, as is. You'll get an undefined - that's expected. | |
// 3. Look at the network tab. You'll see all 200s. | |
// 4. Uncomment the json-parse include. | |
// 5. Load page again. You'll get an undefined - that's not expected. | |
// 6. The success callback is being invoked before the json-parse module is interpreted. | |
// 7. Look at the network tab.You'll see 304s, for the original modules, | |
with a 200 for the new json-parse module. | |
// 8. Reload the page. You'll see all 304s, and the alert works fine. | |
// 9. Clear cache and reload the page. You'll see all 200s, and the alert works fine. | |
// 10. Remove cssgrids - The alert works fine, whatever your cache state is. | |
// The {combine:false} probably doesn't really make a difference. | |
// It would probably fail if it generated one combo request and then another also. | |
// Seems like it just needs one 304 js request, one 304 css request and one 200 js request. | |
YUI({combine:false}).use("oop", "cssgrids", /*"json-parse",*/ function(Y) { | |
alert(Y.JSON); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NOTE: The choice of modules is just to minimize the number of dependencies/complexity of the repro case. It has nothing to do with the bug.
You can set YUI({async:false}) to work around it on IE10, at the cost of performance, until the root issue is resolved.