Jump to content

Submit Query after somebody has been on the page for a certain amount of time


Recommended Posts

Hey, I'm in the middle of creating a website and i am stuck.

Basically, I have added a view count to a page so when a user clicks on a page, it submits a query to update the view count. Now the problem is that if people constantly hit refresh, the view count will go up every time that page loads for even the slightest second. So I'm wondering if it's possible to make it so that the query only submits after the user has been on the page for a certain amount of time (5 seconds). Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...