Skip to content

Add offline/install capability#905

Open
hwbllmnn wants to merge 8 commits intomasterfrom
add-offline
Open

Add offline/install capability#905
hwbllmnn wants to merge 8 commits intomasterfrom
add-offline

Conversation

@hwbllmnn
Copy link
Member

@hwbllmnn hwbllmnn commented Feb 24, 2022

Description

Adds rudimentary offline capability. This also adds a button to the sidebar to enable caching. This will have the following effect:

  • on startup a service worker is installed (if not running already)
  • after install, the service worker will pre-cache the main application files
  • once the button is clicked, ALL subsequent requests will be cached, clicking the button again will stop caching

Once some map areas are cached, the page can be loaded even when offline (try simulating this in the dev tools in the network tab). Areas which have been cached will show a map, uncached areas will be displayed empty.

The manifest.json has also been fixed so the app can be 'installed'. This works best on mobile devices, but e.g. recent Chrome versions also have this capability on desktop.

@terrestris/devs Please review.

Pull request type

  • Bugfix
  • Feature
  • Dependency updates
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe)

Do you introduce a breaking change?

  • Yes
  • No

Checklist

  • I have added a screenshot/screencast to illustrate the visual output of my update.
  • I have added the proposed change to the CHANGELOG.md.
  • I have run the test suite successfully (run npm test locally).

@hwbllmnn hwbllmnn changed the title Draft: Add offline/install capability Add offline/install capability Apr 27, 2022
@marcjansen
Copy link
Member

Can we revive this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants