In its essence, Turbo Drive intercepts all clicks on anchor links to the same domain and updates the page without a full-reload.

When you click a link, Turbo Drive does the following:

  1. Prevent the browser from following the link,

  2. Change the browser URL using the History API,

  3. Request the new page using a fetch request

  4. Render the response HTML by replacing the current <body> element with the response and merging the <head> element’s content.

The JavaScript window and document objects as well as the <html> element persist from one rendering to the next.

The same goes for an HTML form. Turbo Drive intercepts and converts Form submissions into fetch requests. Then it follows the redirect and renders the HTML response.

As a result, your browser doesn’t have to reload, and the website feels much faster and more responsive, just like a single-page application.

That's the essence of how Turbo Drive works. You get a bulk of the benefits of modern single-page applications, with a fraction of the complexity associated with the complicated SPA frameworks.

You can check out the documentation to learn more about the advanced features of Turbo Drive. But for now, let's move on to Turbo Frames.