Re: TidHttp(HTML) <> Firefox(HTML)

Giganews Newsgroups
Subject: Re: TidHttp(HTML) <> Firefox(HTML)
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Sat, 7 May 2005

"Gregory" <kyr…@softhome.net> wrote in message
news:8E545544F1C9E240kyr…@softhome.net...

> When downloading a page hrough Firefox the HTML code
> is different than what gets downloaded with TidHttp.

Sometimes web servers generate different HTML for different browsers, based
on known capabilities of different browsers.  IE treats certain things
differently than Netscape, which treats certain things differently than
Opera, etc.  Web servers try to optimize their content to the actual browser
when possible.

You can use the TIdHTTP.Request.UserAgent property to mimic different
browsers.  It is set to 'Mozilla/3.0 (compatible; Indy Library)' by default.
IE6, for example, is 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)'
instead.  I don't know what Firefox's UserAgent is.

Gambit

Replies

In response to

TidHttp(HTML) <> Firefox(HTML) posted by Gregory on Sat, 7 May 2005