Skip to content

Instantly share code, notes, and snippets.

@lanwin
Created April 23, 2015 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lanwin/512731f4a0f73631a4fd to your computer and use it in GitHub Desktop.
Save lanwin/512731f4a0f73631a4fd to your computer and use it in GitHub Desktop.
Endless XMLHttpRequest leaves a tmp file for every request when responseType = 'blob' is set # 3
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
function onload(s) {
console.log(s);
func();
}
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 = onload;
xhr.send();
}
func();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment