DEV Community

Gurupal Singh
Gurupal Singh

Posted on

Router.back() won't work in incognito mode or when link comes from different source..!!

Hi, i am using nextjs as react framework for my ecommerce website. My product detail page have an custom back button which is having Router.back() function. This works normal when browsing back and forth in website. But whenever i copy the product detail link and open directly in incognito mode the custom back button won't work...!!

Anyone have solution for this ?

Discussion (1)

Collapse
gurupal profile image
Gurupal Singh Author

I have resolve this thing.. thanks