           clearTimeout(scrollTimeout)
           scrollTimeout = null
         scrollTimeout = setTimeout(scrollHandler, 250)
+
+      # Set a data attribute so we can find again after a turbolink page is loaded
+      @$container.attr('data-jquery-infinite-pages-container', @instanceId)
+
+      # Setup callbacks to handle turbolinks page loads
+      $(window.document)
+        .on("page:before-unload", => @_invalidateActiveRequests())
+        .on("page:change", => @_recache())
 
     # Internal helper for logging messages
     _log: (msg) ->

      @_log "Scroll checks resumed"
      @check()

  # Define the plugin
  $.fn.extend infinitePages: (option, args...) ->
    @each ->

      @$container = $(container)
      @$table = $(container).find('table')
      @$context = $(@options.context)
      @instanceId = @constructor._nextId()
      @invalidateAt = +new Date # timestamp before which we ignore responses
      @requestAts = [] # list of timestamps for pending requests
      @init()

    # Setup and bind to related events
