Skip to content

Caching

Turbo caching is enabled by default, making back/forward navigation instant, and allowing for an instant preview when navigating to a cached page while Turbo fetches a fresh version from the network.

There are additional considerations that your behaviours may have to account for, and we provide detach triggers for caching that you can respond to.

Various events provide information as to whether a request, response, render, and so on are for a preload or not.

Excluding elements from caching

Adding a data-refreshless-temporary attribute to an element will remove it prior to caching the page. This functions identically to data-turbo-temporary.

See also cache events, which allow for altering the page in more complex ways before caching and after restoring from cache.