|
Posted by Skeleton Man on 09/16/05 23:40
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 =----
Navigation:
[Reply to this message]
|