Shopify/Timber

Cart drawer not updating on IE11

Closed this issue · 1 comments

http://www.blooms.com.hk

I've been at it for hours but I can't seem to figure out what's wrong with my ajax cart. Console isn't showing anything related to it too. Can anyone point me to the right direction?

Everything seems to be working alright in Firefox or Chrome but it's IE that becomes funky. Whenever I add a product, the drawer opens but items aren't getting updated. If there's no product in the cart, that means the drawer will stay empty. Even after reload.

Seem to have fixed this one. Problem was IE was caching ajax requests, I think? It doesn't take any newly added products until I close the browser and open it again. Likewise, removed items stay in the drawer even if the cart is already empty unless I close and open a new window.

Fixed it by adding
$.ajaxSetup({ cache: false });
before the ajax cart init.

I'm shooting at the dark here so I don't know if this is proper, but it's currently working so it's cool now.