diff --git a/_source/handbook/02_drive.md b/_source/handbook/02_drive.md index 5417c9e..92a35cd 100644 --- a/_source/handbook/02_drive.md +++ b/_source/handbook/02_drive.md @@ -311,4 +311,54 @@ Preload links into Turbo Drive's cache using `Hom This will make page transitions feel lightning fast by providing a preview of a page even before the first visit. Use it to preload the most important pages in your application. Avoid over usage, as it will lead to loading content that is not needed. It also dovetails nicely with pages that leverage [Eager-Loading Frames](/reference/frames#eager-loaded-frame) or [Lazy-Loading Frames](/reference/frames#lazy-loaded-frame). As you can preload the structure of the page and show the user a meaningful loading state while the interesting content loads. + +## Ignored Paths + +Paths with a `.` in the last level of a path/URL will not be handled by Turbo unless they end in a file extension `.htm`, `.html`, `.xhtml`, or `.php`. Turbo will ignore forms and links that target these paths. For example, the following forms would be ignored: + +```html +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+``` + +The following forms would be handled: + +```html +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+``` + + +Setting any `data-turbo` methods (including `data-turbo="true"`) will not override or force Turbo to handle a path if it has a `.` that causes it to be ignored. Paths with a `.` in the top level that do not end in `.htm`, `.html`, `.xhtml`, or `.php` should be reworked on the backend to not include one. Note that some backend frameworks (i.e. Rails) may automatically append parameters/IDs with a `.` such as `/my_path.67`. +

diff --git a/_source/reference/attributes.md b/_source/reference/attributes.md index 9034a7b..7665ca9 100644 --- a/_source/reference/attributes.md +++ b/_source/reference/attributes.md @@ -11,7 +11,7 @@ description: "A reference of everything you can do with element attributes and m The following data attributes can be applied to elements to customize Turbo's behaviour. -* `data-turbo="false"` disables Turbo Drive on links and forms including descendants. To reenable when an ancestor has opted out, use `data-turbo="true"`. Be careful: when Turbo Drive is disabled, browsers treat link clicks as normal, but [native adapters](/handbook/native) may exit the app. +* `data-turbo="false"` disables Turbo Drive on links and forms including descendants. To reenable when an ancestor has opted out, use `data-turbo="true"`. Be careful: when Turbo Drive is disabled, browsers treat link clicks as normal, but [native adapters](/handbook/native) may exit the app. Note that if Turbo [ignores a path](/handbook/drive#ignored-paths), then setting `data-turbo="true"` will not force/override it to enable. * `data-turbo-track="reload"` tracks the element's HTML and performs a full page reload when it changes. Typically used to [keep `script` and CSS `link` elements up-to-date](/handbook/drive#reloading-when-assets-change). * `data-turbo-frame` identifies the Turbo Frame to navigate. Refer to the [Frames documentation](/reference/frames) for further details. * `data-turbo-action` customizes the [Visit](/handbook/drive#page-navigation-basics) action. Valid values are `replace` or `advance`. Can also be used with Turbo Frames to [promote frame navigations to page visits](/handbook/frames#promoting-a-frame-navigation-to-a-page-visit).