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
!> Este archivo aún no está traducido al español, estamos traduciendo... si gustas, puedes ayudar.
3
+
[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) (PWA) son experiencias que combinan lo mejor de la web con lo mejor de las aplicaciones. Podemos mejorar nuestro sitio web con trabajadores de servicio para que funcione **sin conexión** o en redes de baja calidad.
4
4
5
-
[Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) (PWA) are experiences that combine the best of the web with the best of apps. We can enhance our website with service workers to work **offline** or on low-quality networks.
5
+
También es muy fácil de usar.
6
6
7
-
It is also very easy to use it.
7
+
## Crear serviceWorker
8
8
9
-
## Create serviceWorker
9
+
Crea un archivo `sw.js` en el directorio raíz de tu proyecto y copia el siguiente código:
10
10
11
-
Create a `sw.js` file in your documents root directory and copy the following code:
Now, register it in your `index.html`. It only works on some modern browsers, so we need to judge:
108
+
Ahora, regístralo en tu `index.html`. Solo funciona en algunos navegadores modernos, así que debemos verificar:
104
109
105
-
*index.html*
110
+
_index.html_
106
111
107
112
```html
108
113
<script>
109
114
if (typeofnavigator.serviceWorker!=='undefined') {
110
-
navigator.serviceWorker.register('sw.js')
115
+
navigator.serviceWorker.register('sw.js');
111
116
}
112
117
</script>
113
118
```
114
119
115
-
## Enjoy it
120
+
## Disfrútalo
116
121
117
-
Release your website and start experiencing magical offline feature. :ghost:You can turn off Wi-Fi and refresh the current site to experience it.
122
+
Publica tu sitio web y comienza a experimentar la mágica función sin conexión. :ghost:Puedes apagar el Wi-Fi y actualizar el sitio actual para experimentarlo.
0 commit comments