PWA's not working offline

My server runs my PWA’s online fine but if my device has no internet connection then the app just hangs on loading with a stream of 404 messages in the console.

I know 1/10th of stuff-all about anything on that side of things. Any ideas?

There’s more info which it would be helpful to add…

  • what’s your server configuration?

  • does it work properly if deployed to VoltServer?

Works offline when deployed to volt.

Configuration? Sorry I’ve got no idea of much past the router. What type of info would I be looking for?

One of the guys here tried your server. Here’s his observation:

" My guess is that their server is configured to disable browser caches - here are some of the headers being served:

Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Expires: Thu, 1 Jan 1970 00:00:00 GMT
Pragma: no-cache

I would suggest turning this off temporarily and seeing if the problem subsides. If so, they may be able to just disable it for certain resources. We could also perform similar tests on our end depending on how much work we want to do here."

A while back I was trying to fix the code.js file not updating issue and followed this post to try and fix it.

I deleted the .htaccess file and seems to be working now. Thanks for the point in the right direction. Much appreciated.

…and now the code.js file is failing to be updated in Chrome after multiple updates. My htaccess must have been helping that issue but I do have the apps working offline now.

I see Chrome now has a Hard Reload option if you long click the refresh button. It seems to update the code.js file for me, when it wasn’t otherwise.

Thought this info might be helpful to someone.

image

On my server I must do a full deploy (“Deploy to FTP/SFTP Server”). It will then run offline. If I do a “Refresh Deploy” then it will not run offline. Doing another full deploy gets it working again.

John