I've noticed with some sites that the URL in OnNavigateComplete2 is sometimes wrong. To demonstrate, add a TWebBrowser object to the form along with this code...
procedure TForm1.FormCreate(Sender: TObject);
const pDisp: IDispatch; var URL: OleVariant);
Caption := URL;
When it is run and the page has loaded, the Caption wrongly contains something like...
when in fact the actual URL should be...
Why is this? I've noticed it happen with other sites too, such as the About.com sites. It seems to be most noticable with sites that serve ads. Do you know a work around to this problem? When I view the sites in IE itself, I never get this problem. I've tried EmbeddedWB, but it did not make any difference. I'm using Delphi 4 Pro.
Thanks in Advance,