Force Pjax on Same Location #102
anthonyfrancq
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Yes, links with the same path (pathname + query string) trigger no network request by design. For 2.0.0+, you may listen to the anchor yourself, and package the link to a Request object. Pjax always sends Request objects without checking their paths. theLinkYouWant.addEventListener('click', (e) => {
e.preventDefault();
pjax.load(new Request(e.currentTarget.href));
}); If you are interested in native Pjax support, change the category of this discussion to Ideas (or open a new discussion there as you wish) and I will investigate later. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Implemented in 2.1.0! Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
Is it possible to force pjax to load even when the link being clicked on is the current url? It appears that pjax is blocked when the link being clicked on is already the current url.
Beta Was this translation helpful? Give feedback.
All reactions