I want to count the maximum number of login attempts in javascript. I really doubt we can do it in javascript because every time I submit the form it will give me a new instance
of JS file and variables inside. So the previous login counter will be lost on the next form submission. Is there a way we can limit the max login attempts to 3?
I want to count the maximum number of login attempts in javascript. I really
Share
You can use
localStorage, cookies or a hidden input element to keep track of the number of login attempts (remember the dates of the last three login attempts, and compare the dates with the current time).However, do not rely on JavaScript for this purpose, as it’s easy to circumvent this.