Stupid newbie question re website hit counting

M

Michael McLaughlin

Once a month, I run a (mostly perl) script that reads my all my
webserver log files and tallies hits to several webpages. However, I
have always wondered about the accuracy of these counts.

Specifically, if a reader has been to a page before, has this page in
his browser cache and surfs to that URL, does the log still register
that hit with the usual status code (200)? Does it register it at all?

Thanks in advance for any tips.
 
G

Gabriel Reid

Michael McLaughlin said:
Once a month, I run a (mostly perl) script that reads my all my
webserver log files and tallies hits to several webpages. However, I
have always wondered about the accuracy of these counts.

Specifically, if a reader has been to a page before, has this page in
his browser cache and surfs to that URL, does the log still register
that hit with the usual status code (200)? Does it register it at all?

Thanks in advance for any tips.

This is a perl newsgroup, not a webserver newsgroup or HTTP newsgroup, and
as such this post is quite off-topic.

Additionally, the logging of requests in your webserver's logs are dependent
upon which server you are using (you neglected to post that information),
and how it is configured. However, in general an unmodified document that is
in the browser cache will be logged as a 304, not a 200. It will be logged
as a 200 if it is actually fetched from the server. For more information
about this I suggest that you look at this document:
http://www.w3.org/Protocols/rfc2616/rfc2616.html

Gabriel
 
J

J. Gleixner

Michael said:
Once a month, I run a (mostly perl) script that reads my all my
webserver log files and tallies hits to several webpages. However, I
have always wondered about the accuracy of these counts.

Specifically, if a reader has been to a page before, has this page in
his browser cache and surfs to that URL, does the log still register
that hit with the usual status code (200)? Does it register it at all?

Thanks in advance for any tips.

What does this have to do with perl? If you're curious, visit your site
and watch your log to see if it logs it or not.
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top