#759·barba

barba.go() doesn't work with current url

Author: ArifursdevCreated Jun 30, 2026Updated Jun 30, 2026
Labelsbug

What version are you using?

2.10.3

What package are you using?

@barba/core

Describe your issue

javascript
const currentUrl = window.location.href;
barba.go(currentUrl);

does not refresh the components on the current page. If the destination URL is the same as the current URL, nothing appears to be re-rendered.

I also found the documentation for barba.go() to be a bit unclear. It would be helpful to have more information about its parameters, expected behavior, and examples, especially for navigating to the current URL.

Use case

I'm using Barba.js in a PHP WordPress application where parts of the page are rendered based on browser cookies.

After updating the cookies, I need the current page to be re-fetched and its components re-rendered so the server can return updated HTML based on the new cookie values. Calling barba.go(window.location.href) does not achieve this.

Is there a recommended way to force Barba.js to reload the current page and re-run the transition without doing a full browser refresh?