Finding the filesize of a webpage
Web Development
1
Posts
1
Posters
0
Views
1
Watching
-
How do you find the filesize of a page (hosted on another domain) without triggering the "Access Denied" error? I came up with a few methods, none of which works: 1. using XMLHTTP
objHTTP = new ActiveXObject("Microsoft.XMLHTTP"); objHTTP.Open("head", "someurl", false); size=objHTTP.getResponseHeader("Content-Length");
this gives access denied as the url is on another domain. 2. Using iframe and point to the site, then using document.fileSize gave the same error too. Please advise. Thanks