Skip to content

Instantly share code, notes, and snippets.

@justmarkup
Last active October 18, 2016 16:57
Show Gist options
  • Save justmarkup/87ca5901dd47cde5e32f676e7cc741e8 to your computer and use it in GitHub Desktop.
Save justmarkup/87ca5901dd47cde5e32f676e7cc741e8 to your computer and use it in GitHub Desktop.
First View - Flow View - Repeat View

First View (a user visits a page for the first time or has cleared the cache/data since the last visit)

  • Load the core content as fast as possible and do it server-side
  • Load additional and third-party content asynrchronous
  • Inline critical CSS
  • Load web fonts asynrchronous and avoid FOIT and cache for repeat views
  • Fetch non-critical resources asynchronous and cache for later
  • Register a Service Worker and cache main assets
  • Store a cookie for repeat and flow views

Repeat View (a user visits a page again after having closed the page or browser)

  • Serve caches assets and files via Service Worker
  • Serve Web Font from cache (LocalStorage...)
  • Serve cached CSS file and don't inline critical CSS

Flow View (a user has previously visited another page on the same domain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment