PHPackages                             ernestdefoe/seamless-refresh - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ernestdefoe/seamless-refresh

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

ernestdefoe/seamless-refresh
============================

Replaces Flarum's "a new version of this page is available — reload" prompt with a seamless refresh: when the assets change, the next navigation quietly picks them up, so a reading or typing user is never interrupted.

v0.1.0(1mo ago)085↑120%MITTypeScript

Since Jul 8Pushed 1mo agoCompare

[ Source](https://github.com/ernestdefoe/seamless-refresh)[ Packagist](https://packagist.org/packages/ernestdefoe/seamless-refresh)[ Docs](https://github.com/ernestdefoe/seamless-refresh)[ RSS](/packages/ernestdefoe-seamless-refresh/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Seamless Refresh for Flarum
===========================

[](#seamless-refresh-for-flarum)

When Flarum's assets are rebuilt (a deploy, an extension toggle), the running page notices — every API response carries an `X-Flarum-Assets-Revision` header, and if it differs from the one the page booted with, Flarum pops up a dismissible

> **A new version of this page is available.** \[Reload\]

That alert appears **immediately**, right in the middle of whatever you were reading or typing. On a busy forum whose assets change often, it can feel like it's constantly nagging you to reload.

**Seamless Refresh** takes a gentler approach, proposed by [luceos on the Flarum tracker](https://github.com/flarum/framework): when newer assets are detected, it **doesn't interrupt you at all** — it just quietly remembers. The **next time you actually navigate** — click a link, open a discussion, use back/forward — the browser does a normal full page load of that destination, so the fresh assets come along for the ride. No modal, no timing guesswork, no risk of wiping a draft.

- **Never interrupts** a reading or typing user — nothing appears mid-session.
- **Always up to date** — your very next navigation is already on the new assets.
- **Zero configuration** — enable it and you're done.
- **No backend** — it only changes how the frontend reacts to the revision header Flarum already sends.

How it works
------------

[](#how-it-works)

Flarum core detects the new revision in `ForumApplication.checkAssetsRevision` and shows the alert. This extension overrides that method to set a flag instead of alerting, and registers a capture-phase click listener: while the flag is set, an internal same-origin link click is turned into a full page load (`window.location.assign`) so the destination boots with the new assets. Back/forward (`popstate`) reloads too.

It deliberately does **not** touch: modified clicks (Ctrl/⌘/Shift/middle — "open in new tab"), `target="_blank"` / `download` links, in-page anchors (`#…`), `javascript:` / `mailto:` / `tel:` links, or external links. It also never fires while you're just reading or typing — only a real navigation triggers the refresh, and the browser's own "unsaved changes" guard still protects an open composer.

Install
-------

[](#install)

```
composer require ernestdefoe/seamless-refresh
```

Then enable **Seamless Refresh** in **Admin → Extensions**. There are no settings.

Credit
------

[](#credit)

The behaviour is a direct implementation of the "refresh on the next natural interaction" idea [luceos](https://github.com/luceos) proposed as a middle ground between *always interrupt* and *never warn*. If you like it, it's also being proposed for Flarum core.

License
-------

[](#license)

[MIT](LICENSE.md) © ernestdefoe

###  Health Score

34

—

LowBetter than 74% of packages

Maintenance90

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c9978664264055711c21fbcf73c937f758df771d9cb40f6a25370b10123e7abc?d=identicon)[ernestdefoe](/maintainers/ernestdefoe)

---

Top Contributors

[![ernestdefoe](https://avatars.githubusercontent.com/u/24905286?v=4)](https://github.com/ernestdefoe "ernestdefoe (1 commits)")

---

Tags

assetsflarumflarum-extensionrefreshuxassetsflarumuxrefreshflarum-extension

### Embed Badge

![Health badge](/badges/ernestdefoe-seamless-refresh/health.svg)

```
[![Health](https://phpackages.com/badges/ernestdefoe-seamless-refresh/health.svg)](https://phpackages.com/packages/ernestdefoe-seamless-refresh)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

13129.1k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59126.7k16](/packages/fof-byobu)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1941.0k](/packages/flarum-lang-french)[fof/polls

 A Flarum extension that adds polls to your discussions

26137.4k9](/packages/fof-polls)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1035.6k7](/packages/fof-discussion-language)[datlechin/flarum-link-preview

Automatically display a rich preview of the link contents.

1818.3k](/packages/datlechin-flarum-link-preview)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
