tree: c1fcb3864c46f7223e4f9324086fda2da5a44a3a [path history] [tgz]
  1. COMMON_METADATA
  2. DIR_METADATA
  3. OWNERS
  4. prerender_attributes.cc
  5. prerender_attributes.h
  6. prerender_browsertest.cc
  7. prerender_commit_deferring_condition.cc
  8. prerender_commit_deferring_condition.h
  9. prerender_final_status.cc
  10. prerender_final_status.h
  11. prerender_handle_impl.cc
  12. prerender_handle_impl.h
  13. prerender_host.cc
  14. prerender_host.h
  15. prerender_host_registry.cc
  16. prerender_host_registry.h
  17. prerender_host_registry_unittest.cc
  18. prerender_host_unittest.cc
  19. prerender_metrics.cc
  20. prerender_metrics.h
  21. prerender_metrics_unittest.cc
  22. prerender_navigation_throttle.cc
  23. prerender_navigation_throttle.h
  24. prerender_navigation_utils.cc
  25. prerender_navigation_utils.h
  26. prerender_new_tab_handle.cc
  27. prerender_new_tab_handle.h
  28. prerender_subframe_navigation_throttle.cc
  29. prerender_subframe_navigation_throttle.h
  30. prerender_trigger_type_impl.cc
  31. prerender_trigger_type_impl.h
  32. README.md
content/browser/preloading/prerender/README.md

This directory contains the Prerender2 implementation (https://crbug.com/1126305).

If you're interested in relevant code changes, join the prerendering-reviews@chromium.org group.

Summary

Prerendering is “pre”-rendering, it's about pre-loading and rendering a page before the user actually navigates to it. The main goal of prerendering is to make the next page navigation faster, or ideally nearly instant.

The Prerender2 is the new implementation of prerendering.

Terminology

  • Trigger: “Trigger” is an entry point to start prerendering. Currently, <script type="speculationrules"> is the only trigger.
  • Activate: The Prerender2 runs navigation code twice: navigation for prerendering a page, and navigation for displaying the prerendered page. “Activate” indicates the latter navigation.
  • Legacy Prerender: “Legacy Prerender” is the previous implementation of prerendering that does not use NoStatePrefetch. This is already deprecated (https://crbug.com/755921).
  • NoStatePrefetch: An internal mechanism for speculative prefetching of pages and their subresources that are on a critical path of page loading without executing any JavaScript or creating a complex state of the web platform (https://www.chromestatus.com/feature/5928321099497472). This mechanism is not purely “no state” because the HTTP cache allows to create cookies and other state related to validating cache entries. The current prerendering uses this mechanism, that is, it does not actually render pages, while the Prerender2 renders pages.
  • Activation-gated APIs: Web platform APIs that are dependent on user activation. Prerendered pages never have user activation, so the activation-gated APIs automatically fail or no-op in the prerendered pages. The known activation-gated APIs are listed here.

References

The date is the publication date, not the last updated date.

  • Prerender2 (Oct, 2020): Introduces how Prerender2 works and more detailed designs such as Mojo Capability Control.