[webkit-dev] Disallowing modal dialogs during unload events

Sreeram Ramachandran sreeram at google.com
Thu Apr 7 11:31:00 PDT 2011


On Thu, Apr 7, 2011 at 10:54, Maciej Stachowiak <mjs at apple.com> wrote:
> Is there data on:
> - The user impact of modal dialogs being fired from before unload, unload or page hide - how often does this happen?
> - The Web compatibility impact of removing this functionality (are the sites that do it using it for seemingly legitimate reasons)?

Sorry, I don't have any data at the moment (actually, I don't even
have any examples).

> I can think of two ways to gather the data:
> 1) Add some form of opt-in tracking to see how often users hit a modal dialog during an unload event, and sites where this is done, so we could determine if it causes breakage.

We can collect aggregate stats from Chromium, but our privacy policy
won't let us collect specific URLs or sites. So, even if we found that
a very small percentage of users are affected by this, we won't be
able to tell which sites they were on, or whether the dialogs were
necessary or annoying.

> 2) Run automated Web crawlers to find this out.

I'll try, but static analysis of js is hard/impossible; but perhaps
I'll be able to find at least a couple of examples.

> Since we have a potential tradeoff between Web compatibility and usability, it would be good to get some data so that we can weigh the tradeoff.
>
> Side note: when I see a dialog upon leaving  a webpage, it is almost always the beforeunload dialog. I'm not sure I have ever seen a regular alert, prompt, confirm, or showModalDialog when leaving the page. This is part of why I'd like to see data. Would we be solving a real problem with this change, or just a theoretical one?

As agreed on #webkit, we'll proceed by enabling this in chromium and
collecting some aggregate stats (for whatever that's worth), relying
on bug reports to find any specific issues that arise.


More information about the webkit-dev mailing list