Skip to content

Instantly share code, notes, and snippets.

@owenversteeg
Created February 19, 2014 08:20
Show Gist options
  • Save owenversteeg/9087976 to your computer and use it in GitHub Desktop.
Save owenversteeg/9087976 to your computer and use it in GitHub Desktop.
gzipfilesize.js
var http = new XMLHttpRequest();var url = "http://8b51d1abd8.test-url.ws/gzipsize.php";var params = "encode="+prompt('Enter the text to find the gzipped size of');http.open("POST", url, true);http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");http.onreadystatechange = function() {if (http.readyState == 4 && http.status == 200) {alert(http.responseText);}};http.send(params);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment