Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to detect a "prefetch" visit in the backend? #1327

Open
andregoldstein opened this issue Oct 14, 2024 · 0 comments
Open

Possible to detect a "prefetch" visit in the backend? #1327

andregoldstein opened this issue Oct 14, 2024 · 0 comments

Comments

@andregoldstein
Copy link

I'm in the process of setting up "user tracking" for an internal tool, part of this sends the most recent path to Pusher.

However, I'm not aware of any way of detecting if an action has been initiated as part of a "prefetch" visit or not.

It would appear that HTTP_X_SEC_PURPOSE is set to prefetch even on a full click event (I suppose it is an event that was prefetched before committing to the click).

Unless I can differentiate between the two I guess the options remaining are to disable prefetching with <meta name="turbo-prefetch" content="false"> or to implement this in the frontend when the page changes

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

No branches or pull requests

1 participant