Stephan-v
Stephan-v

Reputation: 20309

Check if first time viewing page

At the moment, I'm working on a website that could use some extra user usability, so I want to launch a couple of modal windows to aid users on their first time visiting of a couple pages.

I want to check if it is a users time time viewing a specific page. I've read about how you can run into problems when using cookies to do this. They can be deleted, the user can use a different PC or device, etc.

Also, I want to check for multiple pages if it's their first time viewing, not only directly after login.

I'm guessing a good idea for this would be to make a separate table with the pages in it that I need and setting a boolean for it if it is viewed or not.

Would this be the best way going about doing this?

Upvotes: 3

Views: 3127

Answers (4)

A.Ataei
A.Ataei

Reputation: 1

I think, as I believe, there is no way with no solution. I think, a possible way consists of some parameters which first to be said and and finally by considering those, we can be able to talk about possibilities and impossibilities.

My parameters are in the below;

  • talk about features of a webpage as "User Detection" and detail them
  • think about reactions (I mean being fast to click on any elements of a page or not) on a webpage
  • inspect elements
  • URL injection
  • other reactions like click on some parts as spots placed on the page
  • stay on that page up to a time defined for being and checking authorizing and so some solutions like the ones above.

Upvotes: 0

joschua011
joschua011

Reputation: 4207

As mentioned before, there is no reliable way of detecting users ( and detecting if the user visits the site the first time), I also recomend Madara Uchiha's aproach, also you colud use html5 local storage in addition to cookies, both are not 100% reliable

u can however try user recognition without relying on cookies or html5 storage, but this is extremly complicated, u dont want to do this. Just to satisfy your curiosity about how to do this, check this epic answer on a related question: User recognition without cookies or local storage

Upvotes: 1

Yahia Reyhani
Yahia Reyhani

Reputation: 847

There is no reliable approach if user is not registered and logged in with her/his username & password.

Upvotes: 1

Madara's Ghost
Madara's Ghost

Reputation: 174967

There isn't a highly reliable way of doing that:

  • You can use cookies, but as you said, they are not reliable, a user can change PC, delete cookies, change browser, etc.
  • You can try using an IP address, but that's also not reliable. If a user switches address (which can today happen as you walk down the street with your mobile phone) he'll see the page over and over again. Moreover, if some other user happens to stumble upon the IP address the first user used, he won't see your tour/tutorial.

What I can suggest you is that you use cookies to detect if the user is new, but don't automatically throw the help modules on him, but prompt him using an non-obstructive toolbar at the top or bottom (never a popup window or lightbox).

That way, you get most of the users (because many people use the same browser and computer and rarely delete all their cookies), and even if a user has deleted his cookies/he still won't be disturbed that much.

Upvotes: 5

Related Questions