Service worker templating
A concept you should embrace about service workers is that they can act like a web server in the browser. Traditionally, web servers have used runtime rendering platforms, such as ASP.NET, PHP, Ruby on Rails, and content management systems such as WordPress, Drupal, and Joomla!. These systems are rendering engines more than anything else. You can perform HTML rendering inside of a service worker.
Single-page applications have become very popular this decade. They effectively take ownership of this rendering process from the server. Today, it is popular to preload application templates, whether you're using mustache, handlebars, or larger frameworks such as Angular and React. All of these are essentially just HTML ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access