<link rel="apple-touch-icon" sizes="120x120" href="icon-120x120.png"> <link rel="apple-touch-icon" sizes="152x152" href="icon-152x152.png"> <link rel="apple-touch-icon" sizes="180x180" href="icon-180x180.png"> Safari on IOS can install to home screen…
to indicate an origin that will be used to fetch required resources, and that the user agent should resolve as early as possible.—> <link rel="dns-prefetch" href="https://node-hnapi.herokuapp.com"> </head> </html> Use of rel=dns-prefetch suggests a browser should resolve the DNS of a specific domain prior to it being explicitly called.
Preload resources you have high-confidence will be used in the current page. Prefetch resources likely to be used for future navigations across multiple navigation boundaries.
import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker(); After Build
install ember-service-worker-asset-cache $ ember install ember-service-worker-cache-fallback $ ember install ember-service-worker-force-update Ember Server Worker A pluggable approach to Service Workers for Ember.js
GlimmerApp(defaults, { 'esw-index': { // Where the location of your index file is at, defaults to `index.html` location: 'app-shell.html', // Bypass esw-index and don't serve cached index file for matching URLs excludeScope: [/\/non-ember-app(\/.*)?$/, /\/another-app(\/.*)?$/], // Leave blank serve index file for all URLs, otherwise ONLY URLs which match // this pattern will be served the cached index file so you will need to list // every route in your app. includeScope: [/\/dashboard(\/.*)?$/, /\/admin(\/.*)?$/], }, 'asset-cache': { include: [ 'assets/**/*', '**/*', 'sw-registration.js', ], exclude: [ '**/*.txt', '**/*.css', 'test.json', 'sw.js', ], requestMode: ‘cors', }, 'esw-cache-fallback': { patterns: [ 'https://node-hnapi.herokuapp.com/(.+)', ], },
A node module for generating service worker files based on provided configuration options. service-worker-plugin A webpack plugin for generating dynamic service worker files and a runtime helper. service-worker-mock A mock service worker environment generator. Used for testing service worker code. https://www.pwabuilder.com