Closed nicksay closed 8 years ago
LGTM. Is there anyway to cover this behavior in jasmine tests?
lgtm
A test is a good idea. We have a couple options here:
isNavigable_
to allow navigation from /page#target
to /page
, making these transitions eligible to send a request. For reference, Chrome makes a request in this case when clicking or going forward, but not when going back.isNavigable_
on demand.I like the sound of Option 1. It's the most predictable behavior and in the majority of cases would just pull from cache anyway, so the performance hit should be minimal.
PTAL I've implemented option 1 and updated the tests
LGTM
The previous change explicitly called
window.location.reload()
after assigning towindow.location.href
to ensure a reload happens for URLs that contain a hash. However, an immediate call towindow.location.reload()
will cancel navigation started by the assignment towindow.location.href
for other cases. Fix this by limiting calls towindow.location.reload()
for only those cases where it is needed.Fixes #377