0

I was wandering. Say I've got a big one-page website. Say it has at some point, a very big image. I'd like the browser to give it some kind of download priority. In this case, is it good to use Link prefetching? Or, should I use Link prefetching only for resources belonging to other documents/pages?

1 Answer 1

1

You should use preload to fetch resources on high-priority if they are needed for current navigation. prefetch is for resources that may be needed for future navigation.

Keep in mind that preload is a declarative fetch - so the browser is forced to make the resource request. Prefetch is a hint - the browser may or may not load the resource stated for prefetch.

Sign up to request clarification or add additional context in comments.

4 Comments

ok, but It it good to use Link prefetching on resources belonging to the same document, or should I use Link prefetching only for resources belonging to other documents/pages?
Prefetch should be used for future navigations and not for current navigation.
Ok, now its clear. I would only point out (slightly offtopic here), for future readers, that currently the preload feature is not so widely supported.
I agree - preload support is limited.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.