Open dandrikop opened 6 months ago
Hi @dandrikop. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
I have verified the above issue with Magento 2.4.6-p1.
Thank you @dandrikop Thank you for your collaboration Let me check it
@magento give me 2.4.6 instance
Hi @andrewbess. Thank you for your request. I'm working on Magento instance for you.
Hi @andrewbess, here is your Magento Instance: https://f2349b08592f91c87159e4067b4e8618.instances-prod.magento-community.engineering Admin access: https://f2349b08592f91c87159e4067b4e8618.instances-prod.magento-community.engineering/admin_1c0d Login: be17cd2c Password: 53128d98b02d
Hello @andrewbess
The below article considers Back/Forward Cache as important:
https://web.dev/articles/bfcache
Typically, home, product and category pages are preferred to be cached by Back/Forward Cache, while shopping cart view and checkout pages should not. However, it is recommended that the administrator is allowed to configure which page types to be cached by Back/Forward Cache, as some store owners may have different needs.
If you are using Varnish or Fastly (which is recommended), the cache-control: no-store flag is also always added on html pages, causing the bfcache to be disabled as explained in web.dev article .
If using Varnish it's here : https://github.com/magento/magento2/blob/2.4/app/code/Magento/PageCache/etc/varnish6.vcl#L233
If using Fastly (in vcl_deliver): https://github.com/fastly/fastly-magento2/blob/775b5a1f434c3818edc66534dda25a3373971fd1/etc/vcl_snippets/deliver.vcl#L8
Apparently Amasty is selling a module allowing to choose on which pages you want to exclude bfcache...
https://amasty.com/bfcache-for-magento-2.html https://amasty.com/docs/doku.php?id=magento_2:back_forward_cache
Thanks for creating this issue.
I really believe the biggest issue with BFCache and Magento are not the unload event handlers (that are ignored on Chrome Mobile Android anyway) but the fact that no-store is always used as @dooblem correctly highlighted.
Do you think there would be appetite to change this status quo?
I mean changing the No Cache scenario to use all headers info except "no-store"?
Description
Magento registers an unload listener for home, product and category pages. As a result the Back / Forward Cache of the visitor's browser is not used. You can easily reproduce it by following the steps below:
Expected behavior
Magento should not register an unload listener for home, product and category pages.
Benefits
Use the bfcache of browsers and allow faster navigation.
Additional information
No response
Release note
No response