Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [Unreleased]

### Changed
- The bfcache handler script is no longer loaded on Hyvä themes. Hyvä handles bfcache restores natively (messages, cart drawer, menus and customer section data), so the script only duplicated that work. The bfcache response headers and URL exclusions still apply on Hyvä.
- The **Update Mini Cart on User Interaction** and **Auto Close Menu** settings now note that they have no effect on Hyvä themes.

### Removed
- `view/frontend/templates/hyva/bfcache/handler.phtml`.

## [2.3.0] - 2026-05-11

### Added
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ All values can be configured at Default, Website, and Store View scopes.
- Yes: Mini cart updates only after user interaction when page is restored from cache (Default)
- No: Mini cart updates immediately on page restore
- Recommended "Yes" to maintain optimal Page Speed and Core Web Vitals scores
* **Auto Close Menu** - Automatically close open menus when page is restored from back/forward cache (for compatible themes). (Default: Yes)
- Has no effect on Hyvä themes, Hyvä reloads the mini cart natively on restore
* **Auto Close Menu** - Automatically close open menus when page is restored from back/forward cache (for compatible themes). (Default: Yes) Has no effect on Hyvä themes, Hyvä closes its menus natively on restore.
* **Exclude URLs** - Optional configuration to exclude specific URL patterns from back/forward cache. Enter URL parts (substring), one per line. The extension automatically excludes non-cacheable URLs, so this is only needed for custom cached URLs that load private data via JavaScript.

> [!IMPORTANT]
Expand Down
6 changes: 4 additions & 2 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@
<comment><![CDATA[
<b>Yes:</b> Mini cart updates only after user interaction when page is restored from cache.<br>
<b>No:</b> Mini cart updates immediately on page restore.<br>
<b>Recommended "Yes" to maintain optimal Page Speed and Core Web Vitals scores.</b>
<b>Recommended "Yes" to maintain optimal Page Speed and Core Web Vitals scores.</b><br>
Has no effect on Hyvä themes, Hyvä handles this natively.
]]>
</comment>
</field>
<field id="auto_close_menu_mobile" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Auto Close Menu</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment><![CDATA[
Automatically close open menus when page is restored from back/forward cache (for compatible themes).
Automatically close open menus when page is restored from back/forward cache (for compatible themes).<br>
Has no effect on Hyvä themes, Hyvä handles this natively.
]]>
</comment>
</field>
Expand Down
9 changes: 2 additions & 7 deletions view/frontend/layout/default_hyva.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="before.body.end">
<block
name="theme-optimization.bfcache.main"
template="MageOS_ThemeOptimization::hyva/bfcache/handler.phtml"
ifconfig="system/bfcache/general/enable"
/>
</referenceBlock>
<!-- Hyvä handles bfcache restores natively, the handler would only duplicate that logic -->
<referenceBlock name="theme-optimization.bfcache.main" remove="true"/>
</body>
</page>
178 changes: 0 additions & 178 deletions view/frontend/templates/hyva/bfcache/handler.phtml

This file was deleted.

Loading