D
duane
Dear Experts:
I am trying to measure a HTML page download time on the client side
and store the value into a textfile located in the server.
I have successfully measured the page download time (client-side)
using JAVASCRIPT and write this value into a textfile in the server
using PHP script. No problem so far.
I call my PHP script using JAVASCRIPT (myPage.HTML):
<BODY ONLOAD = if (first time entering this page) MyPHPScript >
where
MyPHPScript: PHP script that writes values on the server
The problem is after the value is written to the textfile
(server-side), I want the program to go back displaying the HTML page
and finishes where it left off. However with the way I do it, I keep
getting infinite loop. This is the reason:
1. in myPage.HTML => 1st time it reaches BODY ONLOAD -> it'll call
MyPHPscript
2. in MyPHPScript => I redirect the page back to myPage.HTML
3. in myPage.HTML => 2nd time it reaches BODY ONLOAD -> it'll call
MyPHPscript(AGAIN!!)
4. Back to step #2, then to step #3....(infinite loop)
My goal is to prevent the client from knowing that I am calling
MyPHPScript in between my HTML pages. I have about 50 HTML pages right
now that are already running very well and would like to measure the
download time for each page on the client side. I try to minimize my
interference with the original flow of the existing system.
Your help would be greatly appreciated.
I am trying to measure a HTML page download time on the client side
and store the value into a textfile located in the server.
I have successfully measured the page download time (client-side)
using JAVASCRIPT and write this value into a textfile in the server
using PHP script. No problem so far.
I call my PHP script using JAVASCRIPT (myPage.HTML):
<BODY ONLOAD = if (first time entering this page) MyPHPScript >
where
MyPHPScript: PHP script that writes values on the server
The problem is after the value is written to the textfile
(server-side), I want the program to go back displaying the HTML page
and finishes where it left off. However with the way I do it, I keep
getting infinite loop. This is the reason:
1. in myPage.HTML => 1st time it reaches BODY ONLOAD -> it'll call
MyPHPscript
2. in MyPHPScript => I redirect the page back to myPage.HTML
3. in myPage.HTML => 2nd time it reaches BODY ONLOAD -> it'll call
MyPHPscript(AGAIN!!)
4. Back to step #2, then to step #3....(infinite loop)
My goal is to prevent the client from knowing that I am calling
MyPHPScript in between my HTML pages. I have about 50 HTML pages right
now that are already running very well and would like to measure the
download time for each page on the client side. I try to minimize my
interference with the original flow of the existing system.
Your help would be greatly appreciated.