Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The W3C specification requires that redirects are followed automatically, as <a href="https://stackoverflow.com/questions/3820663/is-it-possible-for-xhr-head-requests-to-not-follow-redirects-301-302/3820674#3820674">@Nick suggested in the other answer</a>. However a property to disable redirects is being <a href="http://www.w3.org/TR/2008/WD-XMLHttpRequest-20080415/#notcovered" rel="nofollow noreferrer">considered by the W3C for a future version of this specification</a>:</p> <blockquote> <p>This specification does not include the following features which are being considered for a future version of this specification:</p> <ul> <li>load event and onload attribute;</li> <li>error event and onerror attribute;</li> <li>progress event and onprogress attribute;</li> <li>abort event and onabort attribute;</li> <li>Timers have been suggested, perhaps an ontimeout attribute;</li> <li><strong>Property to disable following redirects;</strong></li> <li>responseXML for text/html documents;</li> <li>Cross-site XMLHttpRequest;</li> <li>responseBody to deal with byte streams;</li> <li>overrideMimeType to fix up MIME types;</li> <li>getRequestHeader() and removeRequestHeader().</li> </ul> </blockquote> <p>However, I wouldn't hold my breath until this is implemented by all browsers. You may want to use a server-side proxy to handle this. Simply write a short script to do a <code>HEAD</code> request in your favourite server-side language/framework, and then use Ajax to query this service. You would also be able to do requests to third-party domains through the proxy as a positive side-effect.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload