8 Matching Annotations
  1. Feb 2021
    1. When people try to port traditional web apps to Turbolinks, they often run into problems because their JS never cleans up after itself.
    2. Turbolinks is a Single-Page Application Turbolinks doesn't just give you some of the benefits of a single-page app. Turbolinks is a single page app. Think about it: When someone visits your site, you serve them some HTML and Javascript. The JavaScript takes over and manages all subsequent changes to the DOM. If that's not a single-page app, I don't know what is.
    3. Now if you think about it, PJAX sounds a lot like Turbolinks. They both use JS to fetch server-rendered HTML and put it into the DOM. They both do caching and manage the forward and back buttons. It's almost as if the Rails team took a technique developed elsewhere and just rebranded it.
    4. There's an approach we've been using for years that lets us have our cake and eat it too. It's called PJAX, and its big idea is that you can get SPA-like speed without all the Javascript. When a user clicks a link, the PJAX library intercepts it, fetches the page and updates the DOM with the new HTML.
  2. Sep 2020
    1. Also, some third-party libraries also don't play nicely with the Turbolinks approach, so you may want to consider whether Turbolinks is the right fit for this.