How do you measure the size of a page delivered to the browser (and the Viewstate)

J

Joe Fallon

Is there a good way to measure the size of a page delivered to the browser?
Also, how do measure the size of Viewstate?

I am just using View Source, saving the text file and looking at the number
of kb in the Properties of the file.
Then I delete everything but the viewstate and measue it the same way.

1. Is it accurate?
2. Is there a better way? (I want to measure over 100 pages.)
 
M

Mark Fitzpatrick

Turn Tracing on. The trace will actually tell you the size of the ViewState
and even how much the individual controls take up. There are add-ins that
will watch the http flow that can tell you how many bites are transferred
for a specific action, which gives an excellent real view of what's going
on. I think one of them is for IE and called iewatch and is at
www.iewatch.com.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
B

Bruce Barker

its accurate (doesn't include headers though). firefox is easier.

-- bruce (sqlwork.com)
 
B

Brock Allen

You can enable tracing by setting <%@ Page Trace=true %>. There's a section
that shows the render size and ViewState size. I don't know if there's an
API for this info though.
 
M

Mythran

Bruce Barker said:
its accurate (doesn't include headers though). firefox is easier.

-- bruce (sqlwork.com)

It's not accurate if you include images, stylesheets, videos, et cetera.
When you measure it that way, all you are measuring is the html of the
single page that is being received.

To really view the # of bytes, you'll need an external tool, or addin, that
would do this. Ethereal is one that comes to mind that shows you exactly,
byte-to-byte of what is being sent and received between the two machines.

Mythran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top