Web App Offline PWA

Hi Guys,

Should my Web App be able to run without being connected to the internet?

If yes what do I need to do to get it to work. Do i need to donwload and include bootstrap 4 sdk and jqwidgets?

In its current state i.e. if no sdk’s loaded and go switch the device in airplane mode - start app - forms all appear scrambled.

If App already running and the internet is lost the App continues to work in the normal way.

Thanks chaps.

Ian.

Are there any error messages in the Chrome Console?

Here are the messages.

See attached screenshot

Thanks - I am able to reproduce this here. We will look into this.

Here is what I did to reproduce what you are seeing:

  1. Load the app
  2. Go into Chrome Dev Tool, Network tab, and set browser to Offline.
  3. Attempt to reload the page.

I then get errors like yours.

However, it works if I save the PWA properly.

  1. Load the app
  2. Click on the 3 vertical dots at the top right of the Chrome window.
  3. Choose ‘Install xxx’, where xxx is the name of the app.
  4. Unplug the computer from the net
  5. Other sites do not load
  6. My PWA app does load from the Chrome App screen.

I tried the same as described here by George and the apps I tried would not load from the browser when offline but would run when a Home icon is made in either PC or Android computers. I tested both AS versions 6.last and version 7.last with the same results.

Concerned that this was a possible issue I added /index.html to the end of the address in the browser and the apps then worked when in offline mode as they should. Apparently a Desktop or Home Screen icon launcher uses the correct URL. This could be of importance when launching from a browser and the app needs to run another app from the same server. Appending /index.html to the location could prevent issues.

John

@johnC, great observation! I’ll add it to the Wiki.

I made a change to always including /index.html recently when similar problems arose. It does seem a much more secure way to launch PWAs

Using the /index.html extension om my Galaxy S9 gives an icon with a chrome logo in the corner. Chrome asks you to “add shortcut to homescreen”. Without the extension chrome asks to “Install app” and the resulting icon has no chome logo.

With 'Make PWA?" set to true my apps don’t run offline but do if set to false. Is this expected? I was under the impression PWAs ran offline ok.

Apologies if this is fixed in newer versions of AS. I’m running 8.3.0.2 to enable editing of my projects that have jQuery controls.

Seems like an NSB library is not saved for offline use?

Under what circumstances do you see those messages?

I unplug my router and try and run my app. That is the result for all my apps.

Does the Lighthouse analysis (tab in the topline) have anything? One of the things it analyses is PWA requirements.

Nothing when offline. Just errors and question marks.

Online report

What’s the URL to the app? I’d like to try it here.

(Send it to me privately if needed)