Reputation: 9
I made a popup section with "React-js Popup package" and I want to know how could I customize it in order to show it only once time per User IP address. I mean when the same user open my website the pop up will not be shown to him one more time.
Upvotes: 0
Views: 440
Reputation: 549
In my opinion, we have to track a computer's unique identification, not an IP address. The IP address can be changed. I think you want to show popup once per computer.
And @Domino987's way is correct.
Check this answer to get the unique.
Upvotes: 0
Reputation: 8804
If you have a backend, you can send a request to your server.
This will extract the ip adresse from that call and check, if a call from that ip was already made.
If not, it will return true or something and will save the ip in a database.
If the ip is already saved, just return false.
Wait for the response in your frontend and show the popup, if the response is true.
Upvotes: 1