Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

60
Views
Can you manually set the version number in a PWA?

TL;DR

Is there a way to set the version number of a PWA (Progressive Web Application) in the manifest.json or service-worker.js file to override the default (1) to a custom number?


I've already tried adding a version key in manifest.json, but the version number stayed at 1.

{
  "version": 2
}

I've also tried to add a version variable in service-worker.js, like so. However, that didn't set the version correctly either.

const version = 2;

// Also tried...
const VERSION = 2;

So, is it possible to set the version number in a PWA?

7 months ago · Juan Pablo Isaza
1 answers
Answer question

0

An id field was added to the Web App Manifest spec in late 2021. Chrome implemented it in version 96.

I don't think anyone else has implemented this yet, but I believe you can get a similar effect with query parameters in the start_url.

Here's an article that explains further.

7 months ago · Juan Pablo Isaza Report
Answer question
Find remote jobs