function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ray Zhao 3Ray Zhao 3 

How can I call Apex for window.onload but skip the call on the page refresh?

It's kinda like a counter on page visit.  I want to increment the counter only on user's first visit. 
If the user is reloading or refreshing the page, I don't want to increment the counter.  Any ideas?  Helps are greatly appreciated!
Thanks!
ray
bob_buzzardbob_buzzard
I think you'll have to persist this information - so keep track via a custom setting or object of the users that have accessed the page and only increment the counter if they don't already appear in the setting.