Inertia.js v3.9: Pause Polling in Background Tabs | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com) - [Home](https://www.msaied.com)
- [Projects](https://www.msaied.com/projects)
- [Articles](https://www.msaied.com/articles)
- [Certificates](https://www.msaied.com/certificates)
- [About](https://www.msaied.com#about)

           [  Contact](https://www.msaied.com#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com)
- [ProjectsCase studies](https://www.msaied.com/projects)
- [ArticlesEngineering notes](https://www.msaied.com/articles)
- [CertificatesCredentials](https://www.msaied.com/certificates)
- [AboutHow I work](https://www.msaied.com#about)
- [ContactGet in touch](https://www.msaied.com#contact)

  [Start a conversation](https://www.msaied.com#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com)
2. /
3. [Articles](https://www.msaied.com/articles)
4. /
5. [Laravel](https://www.msaied.com/articles?category=laravel)
6. /
7. Inertia.js v3.9: Pause Polling in Background Tabs and More

   [Laravel](https://www.msaied.com/articles?category=laravel) 

 Inertia.js v3.9: Pause Polling in Background Tabs and More
===========================================================

 Inertia.js v3.9.0 ships a `background` option to pause or throttle polling in hidden tabs, a `type` property on the `navigate` event to detect history restores, a prefetch cache flush on history clear, and several back-button fixes.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com#person) Published 12 Oct 2026 · Updated 16 Oct 2026 · 4 min read

ShareCopy linkCopied

 ![Inertia.js v3.9: Pause Polling in Background Tabs and More](https://cdn.msaied.com/785/603931b250899e15c76e16c8d9278c82.png) 

  On this page +1. [Pause Polling in Background Tabs](#pause-polling-in-background-tabs)
2. [Detect History Restores in the navigate Event](#detect-history-restores-in-the-codenavigatecode-event)
3. [Prefetch Cache Flushed When History Is Cleared](#prefetch-cache-flushed-when-history-is-cleared)
4. [Back Button Fixes](#back-button-fixes)
5. [InfiniteScroll Requests After Navigation](#infinitescroll-requests-after-navigation)
6. [Key Takeaways](#key-takeaways)

 Inertia.js v3.9.0 was released on October 13, 2026, bringing a handful of quality-of-life improvements and bug fixes that matter for real-world Laravel + Inertia applications. Here is a breakdown of everything that changed.

Pause Polling in Background Tabs
--------------------------------

The headline feature is a new `background` option for `usePoll()` and `router.poll()`. Before this release, a poll running in a hidden tab fired on every 10th interval by default, and there was no way to stop it entirely. The new option accepts three values:

- **`throttle`** (default) — keeps the previous behavior, running every 10th interval while the tab is hidden.
- **`pause`** — stops polling completely until the tab becomes visible again.
- **`continue`** — polls at the full interval regardless of tab visibility.

```javascript
import { usePoll } from '@inertiajs/vue3'

usePoll(5000, {}, { background: 'pause' })

```

When `pause` is set and a poll was due while the tab was hidden, a request fires as soon as the tab becomes visible again. Switching tabs rapidly does not trigger a burst of requests.

The existing `keepAlive` option still works but is now **deprecated**. Replace it with `background: 'continue'`.

Detect History Restores in the `navigate` Event
-----------------------------------------------

Pascal Baljet added a `type` property to the `navigate` event detail. The three possible values are:

- `initial` — first page load or a full reload.
- `visit` — a regular Inertia visit.
- `history` — the browser's back or forward button restored the page from history.

This is useful because a history-restored page shows the props it had when the user left, which may be stale. You can now reload only the props you care about:

```javascript
import { router } from '@inertiajs/vue3'

router.on('navigate', (event) => {
  if (event.detail.type === 'history') {
    router.reload({ only: ['messages'] })
  }
})

```

A full-page load that the browser restores from history also reports `history`, because its props come from the history state.

Prefetch Cache Flushed When History Is Cleared
----------------------------------------------

Calling `router.clearHistory()` or returning `Inertia::clearHistory()` from a Laravel controller previously cleared encrypted history entries but left the prefetch cache intact. This meant a user who logged out and pressed the back button could see a protected page served from the prefetch cache until the entry expired.

v3.9.0 fixes this: clearing history now flushes the prefetch cache immediately. Any prefetch request still in flight at flush time is discarded when it completes. The same behaviour applies to `router.flushAll()`.

Back Button Fixes
-----------------

Two contributors addressed back-button edge cases:

- **Mohammed Sohail** fixed a race condition where a deferred prop, poll, or partial reload response that arrived while Inertia was resolving the page component could overwrite a history-restored page. A history restore now cancels any pending page update.
- **Gianpiero Puleo** fixed `useRemember` incorrectly restoring state from an earlier page on new visits. A remembered value from the first decrypted history entry could bleed into later fresh visits — for example, a previously cleared tab selection reappearing after switching tabs.

InfiniteScroll Requests After Navigation
----------------------------------------

`` requests that started after a navigation had begun were not cancelled by the router, causing callback errors on the new page. When navigating to the same URL with a different query string (e.g., a new sort order), the stale response was merged into the new list. The component now cancels its in-flight request on unmount and ignores callbacks from responses that already arrived.

Key Takeaways
-------------

- Use `background: 'pause'` in `usePoll()` to stop unnecessary server requests from hidden tabs.
- Replace deprecated `keepAlive` with `background: 'continue'`.
- Use `event.detail.type === 'history'` in the `navigate` event to reload stale props after a back/forward navigation.
- Clearing history now also flushes the prefetch cache, closing a potential data-exposure gap after logout.
- Several back-button and `` race conditions are resolved.

---

*Source: [Pause Polling in Background Tabs in Inertia.js v3.9 — Laravel News](https://laravel-news.com/inertia-3-9-0)*

- [Inertia.js](https://www.msaied.com/articles?search=Inertia.js)
- [Laravel](https://www.msaied.com/articles?search=Laravel)
- [Vue](https://www.msaied.com/articles?search=Vue)
- [SPA](https://www.msaied.com/articles?search=SPA)
- [Polling](https://www.msaied.com/articles?search=Polling)

 Frequently asked questions 
---------------------------

  How do I stop Inertia.js from polling when a tab is hidden?Pass `background: 'pause'` as the third argument to `usePoll()`: `usePoll(5000, {}, { background: 'pause' })`. Polling resumes as soon as the tab becomes visible again, and a single catch-up request fires if one was due while the tab was hidden.

   How can I tell whether an Inertia navigate event is a history restore or a regular visit?Check `event.detail.type` inside your `navigate` listener. It returns `'history'` for back/forward navigations, `'visit'` for regular Inertia visits, and `'initial'` for the first page load or a full reload.

   Is the `keepAlive` option in Inertia.js polling still supported?`keepAlive` still works in v3.9.0 but is deprecated. You should replace it with `background: 'continue'`, which keeps polling at the full interval even when the tab is hidden.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://www.msaied.com#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://www.msaied.com#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleBuilding Puzzle Party with Laravel Cloud, Reverb, Flutter, and AI](https://www.msaied.com/articles/building-puzzle-party-with-laravel-cloud-reverb-flutter-and-ai) [Next articlePHP News: A New Site for PHP Releases, RFCs, and Packages](https://www.msaied.com/articles/php-news-a-new-site-for-php-releases-rfcs-and-packages)  

   On this page
-------------

1. [Pause Polling in Background Tabs](#pause-polling-in-background-tabs)
2. [Detect History Restores in the navigate Event](#detect-history-restores-in-the-codenavigatecode-event)
3. [Prefetch Cache Flushed When History Is Cleared](#prefetch-cache-flushed-when-history-is-cleared)
4. [Back Button Fixes](#back-button-fixes)
5. [InfiniteScroll Requests After Navigation](#infinitescroll-requests-after-navigation)
6. [Key Takeaways](#key-takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://www.msaied.com#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/782/215fd94331f880a70b7bfaf16528790d.png) Composer Pacakge · 4 min read### Laravel URL AI Transformer: Extract Structured Data From URLs

14 Oct 2026 ](https://www.msaied.com/articles/laravel-url-ai-transformer-extract-structured-data-from-urls) [ ![](https://cdn.msaied.com/784/000a77bb8acd1c5452f67943b3bbc48b.png) Laravel · 4 min read### Add Email to Any Laravel Cloud Environment with the Resend Integration

14 Oct 2026 ](https://www.msaied.com/articles/add-email-to-any-laravel-cloud-environment-with-the-resend-integration) [ ![](https://cdn.msaied.com/781/c4463b384b964fd45e6f3cfa00f8e95c.png) Laravel · 4 min read### Rule Builders for Every Validation Rule in Laravel 13.36

14 Oct 2026 ](https://www.msaied.com/articles/rule-builders-for-every-validation-rule-in-laravel-1336) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://www.msaied.com#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://www.msaied.com)
- [Articles](https://www.msaied.com/articles)
- [Certificates](https://www.msaied.com/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://www.msaied.com/sitemap.xml)
