Skip to content

Instantly share code, notes, and snippets.

@lanwin
Created April 9, 2015 09:45
Show Gist options
  • Save lanwin/ad98f0b37222b4f08478 to your computer and use it in GitHub Desktop.
Save lanwin/ad98f0b37222b4f08478 to your computer and use it in GitHub Desktop.
XMLHttpRequest leaves a tmp file for every request when responseType = 'blob' is set
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
for(var i=0;i<10;i++) {
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)};
xhr.send();
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment