Can you detect a 301 redirect with Microsoft.XMLHTTP object?

Posted by dmb on Stack Overflow See other posts from Stack Overflow or by dmb
Published on 2010-04-07T16:39:02Z Indexed on 2010/04/07 16:43 UTC
Read the original article Hit count: 225

I'm using VBScript and the Microsoft.XMLHTTP object to scrape some web data. I have a list of URLs to check, but unfortunately some of them 301 redirect to others on the list, so I wind up with redundant data.

Is it at all possible to make the XMLHTTP object fail on 301 redirect? Or at least cache the original response header? Or otherwise just let me know what happened?

(notes: I have no control over the server I'm requesting data from; when I get new data, I could check if it's redundant, but I'd like to avoid that if possible).

Any ideas would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about xmlhttprequest

Related posts about msxml