By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,705 Members | 2,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,705 IT Pros & Developers. It's quick & easy.

Calculate sent file size

P: n/a
Hi,
How can I find out what is the size of the HTML page i've sent to the
client's browser?
(Without using the server logfiles)

Roy.
Jul 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
<%
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FL = FSO.GetFile(Server.MapPath("this_is_the_file.html" ))

Response.Write FL.Size

Set FSO = Nothing
%>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Roy Danon <ad***@droyd.net> wrote in message
news:c1**********@news2.netvision.net.il...
Hi,
How can I find out what is the size of the HTML page i've sent to the
client's browser?
(Without using the server logfiles)

Roy.

Jul 19 '05 #2

P: n/a
Ah, but what about when it's an ASP page that can vary in output length
based on user input?
I was going to say that you could have the page call itself with an http
request using xmlhttp, but it seems this would cause an endless loop that
your server may not enjoy.

page calls page, which calls page, which calls page, which calls page, which
calls page, which calls page....

Of course you could always have the page only call itself if the remote_addr
is not the IP of the server or something like that.

Ray at work
"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
<%
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FL = FSO.GetFile(Server.MapPath("this_is_the_file.html" ))

Response.Write FL.Size

Set FSO = Nothing
%>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Roy Danon <ad***@droyd.net> wrote in message
news:c1**********@news2.netvision.net.il...
Hi,
How can I find out what is the size of the HTML page i've sent to the
client's browser?
(Without using the server logfiles)

Roy.


Jul 19 '05 #3

P: n/a
> Of course you could always have the page only call itself if the
remote_addr
is not the IP of the server or something like that.


Or pass a parameter that says "don't invoke the XMLHTTP call"... that way
you could test either from remote or local.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #4

P: n/a
My Mistake,

By saying "the HTML page" I ment the HTML code the ASP application
generates.
Thanks,
Roy.
"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
<%
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FL = FSO.GetFile(Server.MapPath("this_is_the_file.html" ))

Response.Write FL.Size

Set FSO = Nothing
%>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Roy Danon <ad***@droyd.net> wrote in message
news:c1**********@news2.netvision.net.il...
Hi,
How can I find out what is the size of the HTML page i've sent to the
client's browser?
(Without using the server logfiles)

Roy.


Jul 19 '05 #5

P: n/a
My point here is to measure the level of traffic a groups of pages uses and
limit it at some point,
requesting the page again with couse doubled traffic which is simply a waste
of money and resources.
Roy.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:ea****************@TK2MSFTNGP10.phx.gbl...
Of course you could always have the page only call itself if the

remote_addr
is not the IP of the server or something like that.


Or pass a parameter that says "don't invoke the XMLHTTP call"... that way
you could test either from remote or local.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #6

P: n/a
"Roy Danon" <ad***@droyd.net> wrote in message
news:c1**********@news2.netvision.net.il...
: My Mistake,
:
: By saying "the HTML page" I ment the HTML code the ASP application
: generates.

The HTML code or the file size including any images, etc.? Do you really
want to limit or change accordingly? If the log file already performs the
calculations for you, anything else you use "is a waste of money and
resources." Using the log file, it's a simple lookup, run it each night and
if the user goes over their limit, charge them accordingly.

http://webdesign.about.com/cs/logana...oganalysis.htm

HTH...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #7

P: n/a
"Roland Hall" wrote:
:"Roy Danon" wrote:
: : My Mistake,
: :
: : By saying "the HTML page" I ment the HTML code the ASP application
: : generates.
:
: The HTML code or the file size including any images, etc.? Do you really
: want to limit or change accordingly? If the log file already performs the
: calculations for you, anything else you use "is a waste of money and
: resources." Using the log file, it's a simple lookup, run it each night
and
: if the user goes over their limit, charge them accordingly.
:
: http://webdesign.about.com/cs/logana...oganalysis.htm

change = charge.
Jul 19 '05 #8

P: n/a
> My point here is to measure the level of traffic a groups of pages uses
and
limit it at some point,
requesting the page again with couse doubled traffic which is simply a waste of money and resources.


How many different variations of the ASP page can be sent back? Couldn't
you measure that up front?
Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.