need to know this! (hits or refersh)

A

amit

hi group,

i have a packet-sniffer which I feed it thru a javascript code. it
shows me how many times a link or page is clicked or hitted (freshed)
or using back button.

the problem I'm having is that it shows it on one computer and on a 2nd
computer it doesn't increase the number of hits when I refresh the page
or use the back button.

Can somebody tell me where should I focus to find the problem? or if
you know it please give me an advice.


thanks
 
V

Vincent van Beveren

Can somebody tell me where should I focus to find the problem? or if
you know it please give me an advice.

Sounds like a caching problem. Did you try to disable caching on the
page. Put this in your header:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 1 Jan 2000 00:00:00 GMT">

Vincent
 
A

amit

Vincent said:
Sounds like a caching problem. Did you try to disable caching on the
page. Put this in your header:
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 1 Jan 2000 00:00:00 GMT">

Vincent

Hi Vincent,

Yes I did try it already. As far as I know this type of meta statements
are not useful but thanks indeed for your response. I'm trying to find
a way to control browser's cache using javascript or maybe someone can
come up with a better solution.

thanks agagin.
 
P

Paul Davis

Try appending the url with a random querystring ?foo=randomValue
So, every hit to the page is requesting a different url
 
K

Kevin Darling

amit said:
i have a packet-sniffer which I feed it thru a javascript code. it
shows me how many times a link or page is clicked or hitted (freshed)
or using back button.

the problem I'm having is that it shows it on one computer and on a 2nd
computer it doesn't increase the number of hits when I refresh the page
or use the back button.

Unless you control all the computers' settings yourself, then you can't
know if they go back.

For example, under IE / Tools / Settings you can set the page to be
refreshed Never. If IE has the page in cache, it's not going to go out
again... unless perhaps you set the page to expire immediately in its
HTTP header... I'll have to test that again.

Kev
 
A

amit

Kevin said:
Unless you control all the computers' settings yourself, then you can't
know if they go back.

For example, under IE / Tools / Settings you can set the page to be
refreshed Never. If IE has the page in cache, it's not going to go out
again... unless perhaps you set the page to expire immediately in its
HTTP header... I'll have to test that again.

Kev

Thanks now it is working by generating a random number that is
possible. In my case, I'm passing time and since it keeps changing
(seconds) to everytime I request the page.

Thanks,
Amit
 
A

amit

Paul said:
Try appending the url with a random querystring ?foo=randomValue
So, every hit to the page is requesting a different url


Hi Paul,

Your were right!

Thanks now it is working by generating a random number that is
possible. In my case, I'm passing time and since it keeps changing
(seconds) so everytime it requests the page.

Thanks,
Amit
 

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,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top