Next.js Discord

Discord Forum

4 entries in the history stack for pages with an external script

Unanswered
Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
I'm getting an interesting history stack bug. In my app I'm using an external script which renders a booking widget into the DOM (comes from an external booking proivider). Every page that has that included creates 4 entries in the history stack (user has to go back 4x times in the browser). If I remove the widget the history stack works as expected. What could be the problem?

Im using Next.js 15 with the app router

0 Replies