Many of us have probably been trapped by a clever use of the browser alert feature by a spam website that we had the misfortune of being sent to. You try to exit and get another alert, which stops you from leaving the page. This is an important feature for UX in a way, because it allows web developers to save the user from accidentally exiting before work has been saved or where user input might be lost.

On the other hand, I think we could solve the issue of trapping via alert if, say, W3C specified that an alert could only be triggered within a certain time frequency.

Is there any case where such a restriction on web page alerts might damage UX? Or rather is there a different solution that might solve the problem in a way that doesn't limit the way this feature can be used for positive UX?

I've sometimes noticed an option to disable alerts by a page, but this is only present a fraction of the time. There's a way for the ignore functionality to be tricked / disabled it would seem, so I'm not sure that's a good solution.

1 Answer 1


Chrome adds a checkbox to consecutive alerts from the same site: "prevent aditional alerts from this site". I think that's an excellent solution that doesn't break any use case we might not think of when we consider putting a forced timer on alerts. If a user feels the site missbehaves, they can make it stop.

Some sites might have critical alerts that fire in fast succession, while others have single alerts that shouldn't be there. Forgetting to close a tab with google calendar trips me up most of the time some event starts. That's a single alert I didn't want. But sometimes I do want that notification.

If we put a timer, how long should such a timeout be? 30 seconds is probably long enough to hinder most users in some less common use-case, but short enough to hinder less computer litterate people from exiting scam sites.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.