rails/turbolinks — pull request #98 by oMartell (2012-10-26 16:37:37+00:00)
Title: Fix issue when page doesn't reload if assets changed and the url has a hash param. Ignore target="_blank" links.

This pull request fixes a couple of issues.

* Clicking on a link with hash params when the fetched page has different assets doesn't trigger the reload. This happens because the code first reflects the url and then tries to reload the page if assets changed.

AFAIK window.location.href doesn't reload the page if the url has hash params and is the same as the current url.

My suggestion is instead of the using document.location.href = new_url, used window.location.reload( ) to trigger the page reload. Another solution would be to first fetch the page and then reflect the new url.
* Links that have the attribute "target" = "_blank" should open in a new browser context (window, tab..).
To fix this I added another check in the ignore link method.

What are your thoughts on this?