Meta Refresh

Topics: User Forum
Jun 27, 2010 at 11:22 AM

Hi,

I've done some searching but haven't found a solution for this.

I do the following:

HtmlWeb web = new HtmlWeb();
HtmlDocument htmlDoc = web.Load(<my url>);

but when I examine htmlDoc.DocumentElement.InnerHtml all I see is:

<meta http-equiv="refresh" content="0">

Yet the page renders correctly in the browser.

If I do another call to web.Load I get "Refresh Error".

How do I get the page HTML correctly in this circumstance?

Thanks

Jun 28, 2010 at 7:11 PM

I found the issue.

The site was setting a cookie, then doing a refresh. The next page expected the cookie to exist.

I needed to attach the cookie to the request.