473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

tracking bandwidth

Hi,

I have a chat script which I added very basic bandwidth tracking to as follows:

ob_start();
print "this is some output!";
print "this is more output!";
$bytes = ob_get_length(); // Amount of bandwidth used
ob_end_flush();

The problem is that this merely gives me how many bytes of text were printed...
The script uses JS functions in external files to generate everything for the
page, which means the .js files are cached after the first time and only a
<script> tag and a list of function calls are sent per refresh.

I would like a way to know if the client has cached these scripts, or if they
are being sent for the first time, etc, so I can add the file size of the .js
files to the bandwidth total..

e.g. if ($client_has_not_cached_js_files){ $bandwidth += $size_of_js_file; }

The chat script also allows for user icons, so again I would like to be able to
tell if each image was cached or whether a new copy of the image was sent to the
client.

Is there any way I can get this info with Javascript and then use AJAX to post
it back to the server ?

Regards,
Chris

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sep 16 '05 #1
1 2212
Skeleton Man,
I would like a way to know if the client has cached these scripts, or if they
are being sent for the first time, etc, so I can add the file size of the .js
files to the bandwidth total..

e.g. if ($client_has_not_cached_js_files){ $bandwidth += $size_of_js_file; }

The chat script also allows for user icons, so again I would like to be able to
tell if each image was cached or whether a new copy of the image was sent to the
client.

Is there any way I can get this info with Javascript and then use AJAX to post
it back to the server ?


This is possible but why would you even want to run everything through a
PHP script first? There is no way of telling that the person got the
document unless PHP autoparses everything.

However, you might want to keep a log from apache on the information and
calculate it off of there log file, that will give you much more detail
to work with.

Mike
Sep 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Martin Raychev | last post by:
Hi everybody, I have a need for a web app that will allow a flash client to download files at a specified speed. I am using Flash for an application of mine which downloads JPG slides to...
8
by: Dominic Martin | last post by:
Hi, I need to setup an ODBC link over our Internet connection between MS Access (local) and a MySQL server (Remote - the local PC has the MySQL ODBC driver installed). What kind of bandwidth...
3
by: Kyle Friesen via AccessMonster.com | last post by:
Mike, I have databse that creates a "tracking number" based on the selections made on the form via concatenating. At the end of the tracking number, I need a two digit (01-99) sequence number by...
9
by: Chibi | last post by:
I'm writing an application that's bandwidth intense. My available bandwidth is 1.5Mbps (cable modem) and I know I can reach around 1.4Mbps, if not more. The application I am writing right now...
3
by: vadim | last post by:
Hi, Does anybody have an idea on how to reply to a client who's asking about how much bandwidth my app will need. It's asp.net app with SQL Server backend. Is there any general rule of thumb on...
3
by: Jack Fox | last post by:
While stress-testing our ASP.NET app, we discovered a flaw in our test set-up, which also reveals a flaw in our ASP.NET configuration that we do not know how to address. We simulated too...
1
by: bdockery | last post by:
So I figured out that if you use this html: http://wwwapps.ups.com/WebTracking/processInputRequest?sort_by=status&tracknums_displayed=1&TypeOfInquiryNumber=T&loc=en_US&InquiryNumber1=<TRACKING...
3
by: =?Utf-8?B?R3JhaGFt?= | last post by:
I've added 2 tracking services to the wf runtime; one is the standard SqlTrackingService: trackingService = new SqlTrackingService(<trackingConnectionString>); <workflow...
8
by: FrobinRobin | last post by:
Hi, I intend to use Ajax for a kiosk application, it's primary usage is to retrieve live data from my DB, it's a fairly small amount of data (5 fields, of small data size and limited to 15...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.