Hi,
In debug true, I get this error on first load and then entering a page :
[@barba/prefetch] Error: Timeout error [2000] at XMLHttpRequest.o.ontimeout (barba.umd.js:1)
It seems to display everytime it prefetchs a link, because I get it multiple times.
I'm using :
@barba/core: 2.3.9
@barba/prefetch: 2.1.3
This doesn't break anything but I thought it could be useful to bring it up,
Olivier
Hi/Salut @oguilleux !
This issue is related to this one: https://github.com/barbajs/barba/issues/373.
The timeout error is due to a long delay of response from your web page.
You can adjust the timeout on barba.init using:
barba.init({
timeout: 5000 // default is 2000ms
})
In addition, you can catch the error using the requestError setting:
https://barba.js.org/docs/v2/user/core.html#requesterror
Hope this help! :wink:
Hey @xavierfoucrier
I didn't even think about changing the timeout : giving barba more time to prefetch the pages worked.
Thanks for the tip :)
@oguilleux Perfect! :beers:
Most helpful comment
Hi/Salut @oguilleux !
This issue is related to this one: https://github.com/barbajs/barba/issues/373.
The timeout error is due to a long delay of response from your web page.
You can adjust the timeout on barba.init using:
In addition, you can catch the error using the
requestErrorsetting:https://barba.js.org/docs/v2/user/core.html#requesterror
Hope this help! :wink: