You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the online store's cart page has a potential to be served from the browser's disk cache. If a buyer made changes to quantity, go to another page and click back button (to get back to cart), they would be seeing the old values for qty and total amount (although new values have taken).
Describe the expected behavior
When quantities are updated they should always be up to date.
Version information (Dawn, browsers and operating systems)
Dawn Version: 12.0.0
Chrome Version 108.0.5359.124
macOS Version 13.1
Possible solution
Additional context/screenshots
Here is some of the troubleshooting done by a colleague that brought up the issue to our attention:
Impact
Browsers: Chrome
(checked safari not a problem, did not check others)
Loading from bfcache (no problem)
Loading from disk cache (problem)
Reloading (no problem)
Why does going to guest checkout and back to cart, why is cart not serve from disk cache?
When checkout button is pressed, there is a request to /cart that has a 302 to the checkout. That /cart request invalidates the browser caching the cart page. So if the user were to come back to cart, say from the back button, the cart page isn't cached, and quantity totals show correctly.
Replication steps
Add product to cart
go to cart page
Change quantity
use back button
use forward button
You should see that the quantity and total is using the previous, if you hit reload the quantity and total is updated
The text was updated successfully, but these errors were encountered:
Wasn't able to reproduce on Chrome with replication steps outlined, but was able to replicate bfcache issues still with Dawn (V12).
Steps to reproduce:
NOTE: You must test bfcache using the LIVE theme on a store. Previewing a theme doesn't work as bfcache loads a fresh page copy on back or forward... Didn't investigate, but guessing Shopify is sending no cache headers on previews, so Chrome disables bfcache.
Back issues
Add product to cart
Go to cart page
Change quantity
Click 'back' - cart totals show old totals on product page
Forward issues
Follow steps above then
5) Add product again - cart totals fixed now on product page
6) Click 'forward' - cart totals show old totals (and items if you decided to test that too)
bfcache testing code
<script>
window.addEventListener('pageshow', (event) =>{if(event.persisted){// loading from bfcache (maybe disk cache too?)console.log('PAGE SHOW - persisted - '+location.href);} else {console.log('PAGE SHOW - fresh - '+location.href);}});</script>
Describe the current behavior
the online store's cart page has a potential to be served from the browser's disk cache. If a buyer made changes to quantity, go to another page and click back button (to get back to cart), they would be seeing the old values for qty and total amount (although new values have taken).
Describe the expected behavior
When quantities are updated they should always be up to date.
Version information (Dawn, browsers and operating systems)
Possible solution
Additional context/screenshots
Here is some of the troubleshooting done by a colleague that brought up the issue to our attention:
Impact
Browsers: Chrome
(checked safari not a problem, did not check others)
Loading from bfcache (no problem)
Loading from disk cache (problem)
Reloading (no problem)
Why does going to guest checkout and back to cart, why is cart not serve from disk cache?
When checkout button is pressed, there is a request to /cart that has a 302 to the checkout. That /cart request invalidates the browser caching the cart page. So if the user were to come back to cart, say from the back button, the cart page isn't cached, and quantity totals show correctly.
Replication steps
Add product to cart
go to cart page
Change quantity
use back button
use forward button
You should see that the quantity and total is using the previous, if you hit reload the quantity and total is updated
The text was updated successfully, but these errors were encountered: