title: Manage browser history manually for one part of my Turbolinks-enabled Rails 5 app
body: <p>I am using Turbolinks but I would like to take over history management for one piece of my application's flow. Specifically:</p>
  
  <ol>
  <li>User loads product page</li>
  <li>User clicks on product and product modal appears (without reloading the page)</li>
  <li>Upon loading the product model the URL updates to the loaded product's URL</li>
  <li>User clicks "back"</li>
  <li>The model disappears and the user returns to the product page <em>but the product page doesn't reload</em></li>
  </ol>
  
  <p>If I manually <code>history.pushState(null, null, PRODUCT_URL)</code> after the user clicks in step (2) then everything works except step (5) during which Turbolinks reloads the entire product page.</p>
  
  <p>Ideally I could hook into the <code>window</code>'s <code>popstate</code> event and cancel Turbolink's ajax request, but per Turbolinks docs "Restoration visits cannot be canceled and do not fire <code>turbolinks:before-visit</code>"</p>