Why router.back() works differently in localhost than production environment in nextjs? how can I handle this?
After removing items from cart page when I go back to the previous page using router.back() the cart list length does not update. It never works in production but I saw sometimes it worked in local specially when the route gets a reload. but in production it never reloads what could be the reason?