Skip to content

Conversation

@danielhjacobs
Copy link
Contributor

This adds a configuration option, hideRestoredMessage, which hides the message that appears when Ruffle is restored from the bfcache. This message was added when Toad06 switched from the unload event to the pagehide event, enabling use of the bfcache.

Note that the bfcache is never used with Ruffle on Chromium due to a "bug" (previously intended behavior), therefore this more-so affects Gecko (Firefox). See https://issues.chromium.org/issues/424552566. Basically, Adobe Flash Player would not work with the bfcache, so Chromium disables the bfcache on pages with embeds or objects that have SWF sources. Since modern Chromium no longer supports any plugins, including Flash, this is now unneeded code on Chromium's part.

@kjarosh
Copy link
Member

kjarosh commented Nov 13, 2025

Can we make it an enum that select whether to restore, reload, or ask the user?

@danielhjacobs
Copy link
Contributor Author

In the reload scenario, how would we want that to work? Calling this.reload() in displayRestoredFromBfcacheMessage?

@danielhjacobs
Copy link
Contributor Author

danielhjacobs commented Nov 13, 2025

Added reload, but the content does briefly blink as the page itself has restored from the bfcache.

Screencast.From.2025-11-13.16-01-59.mp4

@danielhjacobs
Copy link
Contributor Author

The enum is bfcacheBehavior: "inform", "restore", and "reload".

@danielhjacobs danielhjacobs force-pushed the add-bfcache-disable-option branch from 7cab140 to 2752865 Compare November 13, 2025 21:08
@danielhjacobs danielhjacobs added A-web Area: Web & Extensions extension Related to the Ruffle WebExtension T-feature Type: New Feature (that Flash doesn't have) and removed extension Related to the Ruffle WebExtension labels Nov 13, 2025
Copy link
Member

@kjarosh kjarosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you! <3

@danielhjacobs danielhjacobs force-pushed the add-bfcache-disable-option branch from 35172bf to 7d976a9 Compare November 13, 2025 21:49
@n0samu
Copy link
Member

n0samu commented Nov 13, 2025

Honestly I would prefer if we removed the message entirely. I find it annoying and not useful. Or we could at least change the default behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-web Area: Web & Extensions T-feature Type: New Feature (that Flash doesn't have)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants