-
Notifications
You must be signed in to change notification settings - Fork 101
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
Allow certain URLs to opt out of prerendering while still eligible for prefetching #907
Comments
@westonruter @mukeshpanchal27 I think it would be great to implement this soon and ship in a 1.1.0 release. Thinking about the implementation, I think the most straightforward way would be to rely on the existing In any case, we should also amend the documentation in the FAQ accordingly to explain how to do that. |
Do we have any examples for when a site would want to opt-out of prerendering while retaining prefetching for a given URL? As for passing a new |
Prerendering is more sensitive for some types of content that prefetching, so we had discussed this to be a useful enhancement. I believe @domenic may have some ideas for examples? |
One example is that on my personal site, I prerender all same-origin links, but prefetch cross-origin ones, because only prefetching works cross-origin. An example of the sort @felixarntz is discussing would be if you haven't made certain parts of your site prerender-ready: e.g., viewing a product page calls client-side JavaScript to update the user's interest database or something like that. So maybe it's fine to prerender all parts of your site except product pages, but you still want to speed up product page loads, so prefetching them is desired. |
@felixarntz Just to confirm that this specific use case isn't possible with the plugin right now, right? It only includes same-origin links without a filter to also include rules for other origins. |
@westonruter Correct. That could potentially be another enhancement to open an issue for. It should probably be a separate filter (this one opt-in rather than opt-out) that only applies to prefetching. In other words, even if the site is configured to prerender, those URLs would still prefetched. I think for this one passing the |
See #897:
Note: Once #946 is merged, this should be implemented against the
feature/modules-to-plugins
branch.The text was updated successfully, but these errors were encountered: