Skip to content

Commit

Permalink
Review page redirection after timeout occurs
Browse files Browse the repository at this point in the history
See #475.
  • Loading branch information
xavierfoucrier committed Aug 8, 2023
1 parent ad86ec8 commit b9bb8cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions source/docs/advanced/recipes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ barba.init({

In addition, you can properly catch the error by using the [`requestError`](#requestError) callback.

> If a timeout occurs when you are trying to go to another page, Barba will redirect you instead of reloading the page.
## Partial output

Barba sends **a custom HTTP Header** named `x-barba` in the `XMLHttpRequest`.
Expand Down
2 changes: 1 addition & 1 deletion source/faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Frequently Asked Questions when starting using BarbaJS.
### Why Barba reload the page on same url?

This is the intended behavior. When a page take time to load and reach the [request timeout](/docs/advanced/recipes/#timeout), it will reload instead of doing "nothing", which can be very frustrating for most users. Use a [`prevent` strategy](/docs/advanced/strategies/#prevent) to change this behavior.
This is the intended behavior. When a page take time to load and reach the [request timeout](/docs/advanced/recipes/#timeout), it will reload or redirect instead of doing "nothing", which can be very frustrating for most users. Use a [`prevent` strategy](/docs/advanced/strategies/#prevent) to change this behavior.

### How to prevent transitions to break?

Expand Down

0 comments on commit b9bb8cc

Please sign in to comment.