1

I am new to PWA and somehow I managed to create a demo of its working.

No that its working(online/offline mode) on my local machine I tried to upload to one of my VPS server on GoDaddy. It works fine in the online mode and everything is working properly. But when I go offline at that time its not loading the data from my cached memory and giving me error 504 on page with.

Check My Demo Here

Console screen capture of cached memory when I go offline: enter image description here

Because of this issue I tried and changed to Amazon Service and there the same code is working in Online and Offline mode.

I tried to contact GoDaddy and I am not getting the proper support from the technical team regarding the PWA configuration on my VPS server.

I need some help in configuring my GoDaddy VPS server for PWA. Is there any specific service that is required on the server that I need to look for?

Thanks in advance for helping me out here.

codemaniac
  • 260
  • 2
  • 14
  • Do you get any errors when installing the service worker? I could guess: wrong content types or not using https. – Roland Starke Oct 25 '18 at 07:49
  • @RolandStarke - There is no error while installing service worker. I am using https also. And the same thing is working on AWS S3 bucket. – codemaniac Oct 25 '18 at 09:16
  • There are a few errors shown in Chrome's Lighthouse audit. Try changing the start_url to './index.html' in your manifest.json. – TimHayes Oct 29 '18 at 17:01

1 Answers1

0

This might be a duplicate of How to handle routing in Angular 5+ Service Workers?

It has to do with that hosted versions of an Angular app, where the --base-href flag is set from the CLI, list absolute URLs for their service worker resources. ngsw-worker is expecting relative url's.

Can you see if the steps described in the stackoverflow answer in the link above fixes your issue?

  • I checked the link that you have mentioned. That doesn't answer my question. Same thing works for me AWS S3 bucket, so it seems there is some configuration of Apache or the service on my server that is creating this problem. – codemaniac Oct 25 '18 at 09:12