cross browser capability and ajax add to cart speculation issue#21
cross browser capability and ajax add to cart speculation issue#215mehulhelp5 wants to merge 2 commits intomage-os:mainfrom
Conversation
|
If I understand the code correctly:
Is that correct? Or is there more to it? Note that with the upcoming new release the default speculation mode here will change from |
| }, { passive: true }); | ||
|
|
||
| // 2️⃣ Chrome / Edge — prerendering API | ||
| if ('prerendering' in document || 'onprerenderingchange' in document) { |
There was a problem hiding this comment.
If a page is loaded without prerendering in Chrome/IE, does this prevent bfcache from initializing at all?
|
I was also able to reproduce this issue, it happens when the product page was prerendered right before adding the item to the cart. In that case, the product page displays outdated content. We’ve implemented this function to handle that situation in the BFcache template: actionRefreshMiniCart(). In my opinion, the logic for handling this issue should be placed in the speculation-rules.phtml template instead of the bfcache/handler.phtml. Please review this approach and let me know your thoughts. Thanks |
|
This issue should be fixed with the merge of #24 Thank you |
@JaJuMa @GrimLink @rhoerr please check and let me know if you found any suggestion on that