Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loadBinary(url){
- var xhr = (typeof ActiveXObject == "function") ?
- new ActiveXObject("Msxml2.XmlHttp.6.0") :
- new XMLHttpRequest();
- xhr.open("GET",url,false);
- if(typeof typeof xhr.overrideMimeType == "function")
- xhr.overrideMimeType("text/plain; charset=x-user-defined");
- xhr.send(null);
- if(xhr.status != 200) return "";
- return (typeof xhr.responseBinary == "function") ?
- xhr.responseBinary :
- xhr.responseText;
- }
Advertisement
Add Comment
Please, Sign In to add comment