How can I get the size (chars or Bytes) of a webpage loaded using TWebBrowser? I mean “size” as length of HTML content of a webpage loaded.
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you must use the Document.FileSize property wich returns the size of the html document in bytes.this property returns the file size as a string. keep in mind It will throw an exception if no page is loaded or if the file is not available in the cache. This means that if the document headers request that the file is not cached then calling FileSize will throw an exception.
Try this example:
for more info you can read this link http://www.cryer.co.uk/brian/delphi/twebbrowser/twebbrowser_oleobject.htm