ajax - Get HTTP headers with JavaScript -
Can I evaluate the status of the URL on a remote server with Javascript? Is this considered a cross-domain reference, even though I did not find the actual content of a document?
If it is not possible with plain javascript, can I perhaps load the document in an iframe?
What I would like to do is to check if the HTTP status code is 200 and if the content-type text is / xml, to ensure that the user entered the URL is valid.
I am using UII Beat.
Can I evaluate the status of the URL on the remote server with Javascript?
Not in a standard browser security context (which I believe unless you say otherwise) because it covers almost all usage cases.
Is it considered a cross-domain reference, even though I did not find the actual content of a document?
Yes.
If this is not possible plain JavaScript, maybe I could load the document in an iframe?
No, and even if you can not access the Ldn't HTTP header.
Comments
Post a Comment