You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Building for Relative Paths](#building-for-relative-paths)
88
87
-[Azure](#azure)
89
88
-[Firebase](#firebase)
@@ -1839,14 +1838,8 @@ is integrated into production configuration,
1839
1838
and it will take care of generating a service worker file that will automatically
1840
1839
precache all of your local assets and keep them up to date as you deploy updates.
1841
1840
The service worker will use a [cache-first strategy](https://developers.google.com/web/fundamentals/instant-and-offline/offline-cookbook/#cache-falling-back-to-network)
1842
-
for handling all requests for local assets, including
for `/` and `/index.html`, ensuring that your web app is consistently fast, even
1845
-
on a slow or unreliable network.
1846
-
1847
-
>Note: If you are using the `pushState` history API and want to enable
1848
-
cache-first navigations for URLs other than `/` and `/index.html`, please
1849
-
[follow these steps](#service-worker-considerations).
1841
+
for handling all requests for local assets, including the initial HTML, ensuring
1842
+
that your web app is reliably fast, even on a slow or unreliable network.
1850
1843
1851
1844
### Opting Out of Caching
1852
1845
@@ -2049,27 +2042,20 @@ If you’re using [Apache Tomcat](http://tomcat.apache.org/), you need to follow
2049
2042
2050
2043
Now requests to `/todos/42` will be handled correctly both in development and in production.
2051
2044
2052
-
When users install your app to the homescreen of their device the default configuration will make a shortcut to `/`. This may not work if you don't use a client-side router and expect the app to be served from `/index.html`. In this case, the web app manifest at [`public/manifest.json`](public/manifest.json) and change `start_url` to `./index.html`.
created by the production build. Navigations for those URLs will always
2060
-
require a network connection, as opposed to navigations for `/` and
2061
-
`/index.html`, both of which will be served from the cache by the service worker
2062
-
and work without requiring a network connection.
2063
-
2064
-
If you are using the `pushState` history API and would like to enable service
2065
-
worker support for navigations to URLs like `/todos/42`, you need to
2066
-
[`npm eject`](#npm-run-eject) and enable the [`navigateFallback`](https://github.com/GoogleChrome/sw-precache#navigatefallback-string)
2045
+
On a production build, and in a browser that supports [service workers](https://developers.google.com/web/fundamentals/getting-started/primers/service-workers),
2046
+
the service worker will automatically handle all navigation requests, like for
2047
+
`/todos/42`, by serving the cached copy of your `index.html`. This
2048
+
service worker navigation routing can be configured or disabled by
2049
+
[`eject`ing](#npm-run-eject) and then modifying the
and [`navigateFallbackWhitelist`](https://github.com/GoogleChrome/sw-precache#navigatefallbackwhitelist-arrayregexp)
2068
2052
options of the `SWPreachePlugin` [configuration](../config/webpack.config.prod.js).
2069
2053
2070
-
>Note: This is a [change in default behavior](https://github.com/facebookincubator/create-react-app/issues/3248),
2071
-
as earlier versions of `create-react-app` shipping with `navigateFallback`
2072
-
enabled by default.
2054
+
When users install your app to the homescreen of their device the default configuration will make a shortcut to `/index.html`. This may not work for client-side routers which expect the app to be served from `/`. Edit the web app manifest at [`public/manifest.json`](public/manifest.json) and change `start_url` to match the required URL scheme, for example:
0 commit comments