Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PWA Share

Avatar for Stanley Stanley
November 30, 2018
26

PWA Share

Avatar for Stanley

Stanley

November 30, 2018

Transcript

  1. Pros and cons of server side rendering Better SEO support

    as web crawler will see the fully rendered HTML page Pros Performance benefits as we can fine tune what gets render on server side Cons Increase server-side load One codebase, render everywhere Increase complexity of build and deployment processes. some development constrains, browser-specific code need special handling
  2. JSX on server side TS compiler Webpack Ease to setup

    Can’t run AMD module More effort to setup Can run AMD module more control at build time
  3. performance issue with rendertonodestring it is synchronous and single-threaded performing

    tasks not necessary on the server (such as keeping track of the Virtual DOM and Synthetic Events) Facebook is not using ‘renderToString()’ in production,
  4. • Add to home screen • Offline storage • IndexDB

    • push notification • Service worker • Cache API • background sync
  5. Service worker works like a proxy intercepting all network requests

    (almost all) and provides programatic access for devs to decide what resources to put into cache
  6. Service worker gotcha moments Implement version number to update cache

    Expect to see more request from network tab Clean up the cache Consider using workbox