Skip to content

Conversation

AlexHill
Copy link
Contributor

@AlexHill AlexHill commented Jun 5, 2014

Instead of calling location.replace() in locationReplace, call history.back() and then location.assign(). This means the new page will be loaded with the correct HTTP referer – the previous page's URL.

onPjaxPopstate() shouldn't do anything when we call history.back(), because the popped state will be equal to pjax.state.

@@ -376,8 +376,12 @@ function pjaxReload(container, options) {
//
// Returns nothing.
function locationReplace(url) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In light of these changes, calling this function locationReplace doesn't make a huge amount of sense. I suggest renaming it hardLoad, which describes the functionality rather than the (old) implementation.

@staabm
Copy link
Contributor

staabm commented Dec 4, 2014

@mislav any progress on this?

@mislav
Copy link
Collaborator

mislav commented Dec 4, 2014

I will need to look into this. Thanks for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants