determine lenth of page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
this may be a real silly question

is there a way to detirmine the lenth of a resulting html page while the
page is still in the output buffer before sending it to the brouser ??


Re: determine lenth of page

No. The length of the resulting page is determined by the resolution on the
client's PC. As the browser window is resized so is the text within it, so
as the window becomes narrower it also becomes longer. The whole point of
HTML is that the client decides on the page size, not you.

Tony Marston

Quoted text here. Click to load it

Re: determine lenth of page

Tony Marston wrote:

Quoted text here. Click to load it

And also the fonts and size preferences of the browser also cause the
page to be longer or shorter.

When I read your question I thought you might also mean the size (in
bytes) of the page, as opposed to the "length" (ie how long the page
is). You can do this with PHP using the output buffering functions.

If this is what you were meaning then take a look at the following
manual page which has an example of how to do this:

Chris Hope - The Electric Toolbox - /

Site Timeline