Developer2U
Programmer
I want to create a hit counter for my web site. I have some ideas on how to implement this but I'm looking for feedback from more experienced people.
1- I will have to store this hit counter in either a database or some other file, perhaps an xml file. Which is better? I tried opening a database connection on application start and later found that is a big no no. Plus I got a lot of errors from it.
2- When do I access and return the current hit counter? I am assuming on Application Start or maybe Session Start?
3- When do you add to the current hit counter? At Session End?
Thanks...
1- I will have to store this hit counter in either a database or some other file, perhaps an xml file. Which is better? I tried opening a database connection on application start and later found that is a big no no. Plus I got a lot of errors from it.
2- When do I access and return the current hit counter? I am assuming on Application Start or maybe Session Start?
3- When do you add to the current hit counter? At Session End?
Thanks...