We've all made that annoying mistake of accidentally closing our Chrome browser tabs and windows. It's especially a hassle to wait for Chrome to reload them — it takes even longer depending on your network and how heavy the webpages are. Accidental closers won't have to grieve much longer, as Google is working on a nifty "magic trick" to remove the time spent waiting for Chrome to reload your tabs.

We discovered three new commits over at the Chromium Gerrit that work together to load your recently closed Chrome tabs in an instant. It helps you get back on your feet right away in the event you accidentally closed your tabs — so long as you restore them immediately. A Chrome flag hasn't made its way to the Canary channel yet, a clear indicator that the improvement is not quite ready for testing right now.

One of three commits that enables Chrome to cache closed tabs briefly. 

The underlining code that powers this feature functions similarly to Chrome's back-forward cache (BFcache), Google's method to load a webpage instantly when using the browser's back and forward buttons. When the user misclicks on a tab's close button, Chrome will no longer immediately clear the page from its memory. If the person restores the tab within 15 seconds, Chrome will pull the data from its cache instead of reloading the webpage, giving the impression of instantaneous load. It's like you never misclicked the close button — a big win in a positive web surfing experience. It's unclear how Chrome will cache closed tabs under memory pressure, but we think Google will partially instant-load a few tabs (opposed to all).

If this feature sounds familiar to you, that's because the concept isn't exactly new. As explained in Google's public documentation from last year, Chrome for Android already has its own way of caching closed tabs — albeit much more basic compared to the upcoming improvement (it doesn't freeze the page to reduce CPU utilization). For desktop, caching recently closed tabs makes a lot of sense, especially when people typically have a bunch of tabs open. It's definitely a feature others and myself appreciate, and I'm looking forward to testing it out in forthcoming Canary channel updates.