Skip to Content
DocumentationInstallationCommon

Common

To activate PWA functionality in any frontend framework, please follow the steps


Steps

1. Configure and Save Your Project

Once you configure your application and click Save, Transcodes will generate the following files and host them on your project-specific CDN directory:

  • manifest.json
  • webworker.js
  • serviceworker.js

These files are essential for enabling PWA installation and managing background behavior through the service worker.


  1. Insert the following lines into the <head> of your root HTML file (usually index.html):

Transcodes_CDN_URL, and Project_ID will be generated once you save your project at the board page

index.html
<link rel="manifest" href="https://<Transcodes_CDN_URL>/<Project_ID>/manifest.json" /> <script type="module" src="https://<Transcodes_CDN_URL>/<Project_ID>/webworker.js" ></script>

  1. Create a new file named sw.js at the root of your project and paste the following line:
sw.js
importScripts('https://<Transcodes_CDN_URL>/<Project_ID>/serviceworker.js');

The file locations may vary depending on your frontend framework. Please refer to the corresponding sections below for framework-specific integration instructions.

Last updated on