# PWA

### 1. Upload the files below

1. Preview the manifest: [manifest.json](https://fa9ff54b7f7b1d1edc7b4cf1ed235366.cdn.bubble.io/f1684266069540x287426851963005000/manifest.json)
2. Preview the service worker: [service-worker.js](https://fa9ff54b7f7b1d1edc7b4cf1ed235366.cdn.bubble.io/f1684266046321x984585135361086600/service-worker.js)

Download Files from [Google Drive](https://drive.google.com/drive/folders/1pOJ_lV0scq7Yak2tzi-x6bnGWlqunanc?usp=sharing)

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FWZW40u4bvOW24hjWYjLp%2Fpwa_config.png?alt=media&#x26;token=f89a87a9-a7f7-4fb3-b1d3-8df529438e45" alt=""><figcaption></figcaption></figure>

### 2. Copy the scripts below

Script/meta tags in header

```html
<link rel="manifest" href="/manifest.json"/>
```

Script in the body

```javascript
<script>
 if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
 navigator.serviceWorker.register('/service-worker.js', { scope: '/' }).then(function(registration) {
 // Registration was successful
 console.log('ServiceWorker registration successful with scope: ', registration.scope);
 }, function(err) {
 // registration failed :(
 console.log('ServiceWorker registration failed: ', err);
 });
});
}
</script>
```

### 3. Paste the scripts in the SEO/metatags settings

<figure><img src="https://518164421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT1Q1qC2wVXGuHGdhKlFm%2Fuploads%2FR6wfrQQ59fuFbBYUrt2Q%2Fscript_pwa.png?alt=media&#x26;token=192fc362-86b8-4b43-a4d1-7709e6ff75db" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %} <mark style="color:orange;">**NOTE:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">This feature only works on a paid bubble.io plan</mark>
{% endhint %}
