Refused to get unsafe header "Content-Length"
<p>can anyone help?</p>

<p>I'm newbie here</p>

<pre><code>function getFileSize(url, callback) {
        var request = new XMLHttpRequest();
        //get only header.
        request.open("HEAD", url, true);
        request.onreadystatechange = function() {
            if (this.readyState == this.DONE) {
                callback(parseInt(request.getResponseHeader("Content-Length")));
            }
        };
        request.send();
    }
</code></pre>

<p>Refused to get unsafe header "Content-Length"</p>

<p>that line gives me an error >> allback(parseInt(request.getResponseHeader("Content-Length"))); in console</p>

<p>can anyone help?</p>