GoogleChromeLabs / quicklink

⚡️Faster subsequent page-loads by prefetching in-viewport links during idle time
https://getquick.link
Apache License 2.0
11.02k stars 403 forks source link

Unwanted behavior of the library #71

Closed fkeloks closed 5 years ago

fkeloks commented 5 years ago

Hello,

I just realized something after noticing a "bug" on my site using Laravel:

The pages of the site using the library "pre-load", the php sessions record this load and propel unwanted behaviors.

For example, Laravel's back() function, which redirects to the previous page, redirects the user to a random page because it is pre-loaded by the browser.

It will be necessary to be able to say to the backend not to record this pre-loading.

lukeed commented 5 years ago

This can't be quicklinks's concern. If you have links that you know cannot be pre-fetched (for whatever reason) you have to use the ignores option

You can see an example of this here.

addyosmani commented 5 years ago

@lukeed is correct here that the ignores option is our recommended solution to this issue.

As quicklink aims to be a generic solution, if it's causing issues with Laravel's back() function, we would suggest whichever (random) URLs are causing this should be ignored. A good example of these types of pages are logout/login URLs.