Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7870321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:35:07+00:00 2026-06-03T01:35:07+00:00

i need to count how many times a user has refreshed a particular page

  • 0

i need to count how many times a user has refreshed a particular page using jquery. The page should have a static counter which will increment every time page reloads and if user navigates to another page counter of previous page should be reset to zero i don’t want use session but do this using only jquery .Please help.

thanks im advance…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:35:09+00:00Added an answer on June 3, 2026 at 1:35 am

    There are some hacks that could maybe do this. I’d first ask what user problem you’re really trying to solve because the solution is kind of ugly.

    In pseudo-code, this is what you’d do:

    1. When your page loads, get a cookie for the reloadCnt and get a cookie with your lastActive timestamp.
    2. If the timestamp was longer than X minutes ago, then start reloadCnt over at 1 (the page was not just active before this page load).
    3. If reloadCnt > 1, write the new count back to the cookie with the current time as the timestamp.
    4. Then, in your page, start a timer that runs every Y minutes (where Y is about one half of X). In that timer, keep updating the cookie time of last reload, but not the count. This time stamp tells your next reload whether you just had an active page or whether the browser went some period of time without the page loaded.

    The general idea is that you keep a reloadCnt in the cookie and you increment each time. That part is easy.

    You also keep a timestamp in the cookie. The timestamp essentially contains the time that the page was last running in this browser (because the page is continually updating the timestamp). If the timestamp is old, then the user’s browser was not just showing this page so this must be the first one in a while. If the timestamp is new, then this is probably just another reload.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 3 tables namely: Town; Village; Farmers...and I need to COUNT how many
I have an array in jQuery, and I need to count the number of
I have two tables of concern here: users and race_weeks. User has many race_weeks,
I need a way to count how many times a link is being clicked
I have a table and I need to count all unique users on it.
I have a a large text file (over 70mb) and need to count the
I have 2 tables, tracklist and track , where tracklist has many tracks .
I am looking to calculate how many times people have viewed my users profiles
I need to count number of repeating and position where they repeat of all
I need to count the occurrences of these characters (most of them must be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.