NEW 222304
beforeUnload and unload not called when clicking page refresh button
https://bugs.webkit.org/show_bug.cgi?id=222304
Summary beforeUnload and unload not called when clicking page refresh button
Milan Keser
Reported 2021-02-23 02:41:36 PST
There is an issue if refresh button is clicked a lot of times in short timespan beforeUnload and unload handlers are not called I will attach the reproducer html page The code in the reproducer should set cookie once with value of 1 When clicked refresh button it should clean the cookie It works fine if refresh button is clicked in normal tempo If you would spam the refresh button cookie would never get cleaned up and value would increment. Ocassionaly it would get cleaned during the spam of the refresh button It is important that the page is refreshed only with refresh button I would expect that the unload is always fired and cookie is always deleted
Attachments
Shows the cookie value incremented during page refresh via refresh button (1008.18 KB, image/png)
2021-02-23 02:43 PST, Milan Keser
no flags
Reproducer page (1.35 KB, text/html)
2021-02-23 02:43 PST, Milan Keser
no flags
Milan Keser
Comment 1 2021-02-23 02:43:28 PST
Created attachment 421295 [details] Shows the cookie value incremented during page refresh via refresh button
Milan Keser
Comment 2 2021-02-23 02:43:51 PST
Created attachment 421296 [details] Reproducer page
Milan Keser
Comment 3 2021-02-23 02:52:45 PST
Its important that page loads longer, hence the three big images in the page Refresh button must be spamclicked while page is still loading
Radar WebKit Bug Importer
Comment 4 2021-03-02 02:42:14 PST
Smoley
Comment 5 2021-03-09 15:59:33 PST
This does not reproduce for me on STP121. The reload button becomes a stop button during page loads so spam click just starts and stops the page load.
Note You need to log in before you can comment on or make changes to this bug.