Replace current history entry #157
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is there an option, like
data-pjax-action="replace", for replacing current history entry when requesting a new page by clicking a link or callingloadUrl(href, [options])?eg. Given a history stack,
page-a > page-b, it would bepage-a > page-cafter requestingpage-c.And it seems like a common usage.
Pjax tries to copy the default behavior of browsers, which is to just add to the history stack when navigating to a new page.
I suppose this would be possible to implement, but how would you signify whether you wanted to replaceState() or pushState() when clicking a link?
Setting an data attribute on a link, eg.
data-pjax-action="replace", goes withreplaceState().Otherwise, it goes with the default action
pushState().Is this possible with a regular link, without Pjax?
No. But it may be an enhancement fo common usages.