Created
April 20, 2015 11:51
-
-
Save lanwin/08ed41564f5d3b192157 to your computer and use it in GitHub Desktop.
Endless XMLHttpRequest leaves a tmp file for every request when responseType = 'blob' is set
This file contains 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> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
function func() { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'http://server.cors-api.appspot.com/server?id=1516545&enable=true&status=200&credentials=false', true); | |
xhr.responseType = 'blob' | |
xhr.onload = function(s){ console.log(s); func(); }; | |
xhr.send(); | |
} | |
func(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment