All articles
Curated

Chrome has retired unload by default: what to check

Chrome's October 16 update closes the unload deprecation rollout. A practical reading guide for saving state, auditing third-party listeners and checking back/forward cache, with the official DevTools illustration.

Original author: Barry Pollard; Fergal Daly
Source: Chrome for Developers

Read the original

Stop treating page close as a reliable save point

Barry Pollard and Fergal Daly report that Chrome's default unload deprecation is complete as of Chrome 155. Their point is practical: a backgrounded mobile page can disappear without running a final handler, and an unload listener has also obstructed back/forward cache. Moving critical saves to the moment a tab closes was unreliable even before this change.

Read the update, then inspect a real page

Start with the original announcement, then use the linked migration guide to inventory listeners in your own code and third-party libraries. The guide recommends visibilitychange when a page becomes hidden for state preservation, and pagehide for navigation-related cleanup, with resources restored if the page returns from cache. Use beforeunload conditionally for an unsaved-change warning, rather than as a universal replacement.

The official documentation image below shows where the DevTools back/forward-cache check exposes an unload-related blocker. It is a documentation example, not an audit of Boloop or proof that a current page has this failure.

Google / Chrome for Developers, official Back/forward cache documentation example. Source: Deprecating the unload event, by Demián Renzulli and Barry Pollard, CC BY 4.0. Image unchanged; caption localized. Not a Boloop test.
Google / Chrome for Developers, official Back/forward cache documentation example. Source: Deprecating the unload event, by Demián Renzulli and Barry Pollard, CC BY 4.0. Image unchanged; caption localized. Not a Boloop test. Image source

Open DevTools on the page you maintain, find Application → Background services → Back/forward cache, and use Test back/forward cache. Record the actual blockers and retest the relevant flow after a change; do not infer a speed improvement just from removing one listener.

The announcement retains exceptions: Chrome on iOS uses WebKit, and explicit site or enterprise opt-outs can retain the previous behavior. The authors also describe other Chromium browsers' adoption separately. This is a migration reading recommendation, not a claim that every browser has identical behavior or that Boloop has tested your application.

Sources and further reading

  1. Unload event deprecated in ChromeArticle · Barry Pollard; Fergal Daly
  2. Deprecating the unload event — migration guideOfficial documentation · Demián Renzulli; Barry Pollard
  3. Creative Commons Attribution 4.0 InternationalOfficial documentation · Creative Commons