Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent pull to refresh in pwa - progressive web apps?

as a progressive application is it not good to refresh application accidentally by pulling down the page. is there any standard way (not css tricks) to disable refreshing entire page in PWA?

like image 647
sadeghhp Avatar asked Sep 15 '18 06:09

sadeghhp


People also ask

How do I stop pulling to refresh?

At the moment you can only disable this feature via chrome://flags/#disable-pull-to-refresh-effect - open directly from your device. You could try to catch touchmove events, but chances are very slim to achieve an acceptable result.

How do I refresh PWA app?

You can launch a PWA from your home screen, do what you have to do with it, then launch another app, and go back to the PWA the next day. If you haven't closed the app or turned off your phone in the meantime, it will not reload the page — instead it will simply allow you to continue your session where you left off.

How long does a PWA last?

A PWA that goes unused for a 'few weeks' (we think it is 2 weeks) the iOS device deletes or purges the stored values. That is unless it has been added to the homescreen. Not exactly the most user friendly policy and definitely not favorable to a business using service workers to provide better user experience.

Is PWA going away?

UPDATE: On April 14, Google announced they would be pausing their plan to roll out this feature.


1 Answers

It's work.

body
{
  overscroll-behavior-y: contain;
}
like image 167
Amir Avatar answered Sep 20 '22 11:09

Amir