PWA When should I change my pwabuilder-sw.js?

I start in PWA and have several questions. I have already created my page and it works.

During their studies, they often warned here and there to allow infinite life caches in the browser, but I have never seen or understood how to objectively avoid them.

So I have some questions:

1 – When should I update the service worker file? That is, every time I move the HTML markup on my main page, do I have to add a javascript code or other changes, change the SW file to a new version as well?

2 – As mentioned earlier, my page works fine, but in my Chrome browser, the F12 crawl, the Application tab, the Cache section, and the Cache memory option are my old ones Caches available, although I have set them return caches.delete (cacheName); in the SW file:

self.addEventListener('activate', 
function(event) {
  event.waitUntil(
    caches.keys().then(function(cacheNames) 
{
      return Promise.all(

 cacheNames.filter(function(cacheName) {
          // Return true if you want to remove this cache,
          // but remember that caches are shared across
          // the whole origin
        }).map(function(cacheName) {
          return caches.delete(cacheName);
        })
      );
    })
  );
 });

3 – Is it correct to control the cache name by typing in the first line of my SW file? const CACHE = "pwabuilder-page_201908xxYYzzWW"; and be xxYYzzWW Variable for each new cache?

What am I doing wrong?

How do I avoid splitting the layout in a PWA project?

When you list the files that you want to cache with the Service Worker version, in most cases the style file is made available offline.

Changing the CSS may cause the application to suffer from the divergence and CSS of the "html / javascript" cache in production.

Even if you remove the CSS file from the cache list, this break may happen.

What solutions do you typically use in the PWA scenario or the best solution to avoid a layout change in a new PWA version?

For example, adding a query string if there is a high probability of break, and so on.

rest – The PWA workflow is denied access so that the API call retrieves allocations

I have an SPD 2013 workflow on our PWA site that has worked flawlessly for 6 months.
My colleague left the company and the administrator has disabled his 365 account.

Suddenly the workflow fails and the correct information is not retrieved.

I added e-mail commands to the workflow to send the contents of the dictionary variable immediately after the API call for assignments and to get:

{"error": {"code": "- 2147024891, Microsoft.Office.Project.Server.Exceptions.ProjectServerUnauthorizedAccessException", "message": {"lang": "en-US", "value": "Access denied. You do not have permission to perform this action or access this resource. "}}}

The workflow / e-mail is shown below:

Enter image description here

E-mail command

I have made sure that I am a website owner. I re-enabled my colleague's account as it was before he left, but it still fails.

The list workflow is now triggered when I was the initiator where my colleague was previously.

I'm not an API / workflow expert and can not figure out what I'm missing. Currently, this has implications that we can import project tasks into our SharePoint lists to engineer engineers.

Any ideas of what I need to do to get that working again would be very grateful.

Many thanks
dean

vuejs2 – How to deal with analytics on PWA when deployed both as a web app and as an apk in the play store

How should I use analytics in one PWA Web App? If I add Analytics from Google Analytics to Webapp and publish it to a server, how should I track usage later if I want to publish it to the Google Play Store?

Here is the scenario:

  • I use that PWA from a subdomain.
  • then I publish the PWA from the Google Play Store as TWA,

My concerns:

Should I use the Google Analytics snippet for the web to track subdomain-based PWA and Firebase analytics for my Google Play Store app?

Or,

Can I track both versions at the same time with a single method?

I found this FAQ from Chrome Developer about using Google Analytics

The CPA Library follows the basic usage pattern of Google Analytics and is familiar to existing Google Analytics users. However, unlike Google Analytics' web-based official JavaScript libraries, the CPA library uses an "app-centric" model that works better with packaged apps. Among other things, the library provides methods for certain types of hits, such as event and appView, and can be used in both closure-based and traditional JavaScript projects.

I use Vuejs as a frontend with pwa Template, not sure if it applies to my use case. Any suggestion or any direction would be greatly appreciated.

pwa studio – How to set up a copy of Venia Concept to work locally

I'm into PWA Studio and I want to find out how easy it is to copy Venia-Concept and use it as a stand-alone REACT app. Instead of downloading the entire Monorepo containing all the other packages.

So far, I've tried it below, but an error is issued stating that Babel can not find it.

git clone https://github.com/magento-research/pwa-studio.git venia-temp
cd venia-temp
CP -R packages / Venia concept ../
cp babel.config.js ../venia-concept/
cd ../venia-concept/
Install yarn
cp.env.dist.env
Build a yarn run

$ Yarn-thread clean && yarn-thread build: esm && yarn-thread validate-query && yarn-thread build: prod
$ rimraf dist esm
$ BABEL_ENV = Development babel src -out-dir esm -root-mode & up; & # 39; up; --source-maps --copy-files
/ bin / sh: babel: command not found
Error Command with exit code 127 failed.

Any ideas what causes this problem and how can I get it to work?

I know I could use the venia consumer example or fallback studio, but I'm interested in how it works.


When I run Add yarn Babel-Cli -D I pass the last mistake, but a new one comes …

Build $ yarn run
Yarn run v1.13.0
$ Yarn-thread clean && yarn-thread build: esm && yarn-thread validate-query && yarn-thread build: prod
$ rimraf dist esm
$ BABEL_ENV = Development babel src -out-dir esm -root-mode & up; & # 39; up; --source-maps --copy-files
SyntaxError: src / RootComponents / CMS / CMS.js: Unexpected token (6:15)
4 | Export standard class CMS extends the component {
5 | render () {
> 6 | return ;
| ^
7 | }
8 | }