[NextJS] Make the pre-fetching of links in the RichText component configurable #1516
Closed
pschofield
started this conversation in
Ideas
Replies: 1 comment
-
Closed with #1517 |
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
-
Is your suggestion related to a problem? Please describe.
The next/link component includes a "prefetch" parameter (a boolean that defaults to true) which configures whether the link will be pre-fetched in the background. In many circumstances this gives a good performance experience but can lead to large numbers of network requests, so is useful to be have the ability to disable this behaviour. The RichText component prefetches all embedded internal links without the ability to disable this behaviour.
Describe the solution you'd like
Add a new parameter to the RichText component (my suggestion is 'prefetchLinks') which gives the developer the ability to disable link prefetching. The parameter would default to true so as not to alter existing default behaviour.
Is there a way to achieve this functionality with exisiting tools?
As the prefetching occurs in an inner function it is not possible to alter his behaviour externally.
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions