what is the NoState Prefetch of prerender?

Viewed 165

I just read https://developers.google.com/web/updates/2018/07/nostate-prefetch, and it's about the nostate prefetch for prerendering resources. And im confuse about the line:

NoState Prefetch only fetches resources in advance: it does not execute code or render the page

does that mean NoState only prefetch and cache the contents but not rendering or execute them? so who gonna prerender, the browser? or I will have to execute the contents first before it can fully render? I'm a new programmer and really want to know an answer, I knew that prerender will be applied to next navigation and really wanted to know if you could somehow prerender the content without having to manually execute JavaScript or prerendering it thanks!

1 Answers

Prerender

It ensures that a URL with all necessary static resources is fully loaded and set up in the background. You can imagine it as opening a URL in advance in a new tab, but it stays hidden until the user actually calls up the page.

All activities that would take place during an actual page impression, are carried out in the background. If for example you are logged in to an online shop and load the log-off page with the prerender, then you'll be logged off on the next page.

If you are logged into an online shop and load the unsubscribe page via prerender, you are logged off the next time you call up the site.

Prerender stores a URL and all its associated resources in the browser cache and renders the complete page at the same time.

Preload: the resources (URL or image, css, js) are made available as soon as they are required. In other words, they're stored with high priority in the browser cache.

Prefetch: The entire file (css, js, image) is downloaded and saved with low priority in the browser cache.

Related