1. 56

  2. 17

    I wanted to make a little list app for my wife and I. We pay by the megabyte for cell data and my phone is old with a weak battery, so I was considering doing a PWA to minimize the data use and keep it fast.

    Then I realized it is a list. I can do that in < 1 KB of plain old traditional HTML <ol> and <form> with a tiny amount of css to make it look ok. And even the two of us going nuts, the amount of data on this list is unlikely to exceed 1 KB (especially with gzip on the server!). We could load it hundreds of times in a month and not pass the 1 MB cell data bill threshold.

    The wife was amazed at how fast it was and how I was able to deploy it in about twenty minutes after starting from scratch.

    I am kinda embarrassed that I didn’t immediately do it this way. Why did I even consider doing a SPA/PWA for something fundamentally so simple? But I think I’m not the only developer who can get blinded by overcomplicating.

    1. 3

      how do you two update it?

      1. 5

        I saved a link to the little site on both our phones. It has a <form><input /><button></button></form> up top to add a new item to it, and each item has a little delete form button next to it. So can add and remove entries very easily, no fancy scripts, it is just regular old html4 style forms.

        It doesn’t cache, so each load will get the list off the server, and if I want to change the code, it is as simple as editing it there. And then on the server, it just stores it as a .txt file and the form handler manipulates that. I can vim edit it from a computer to get really fancy like reorder, bulk edit, etc.

    2. 3

      What’s interesting is that Google promotes PWAs but is there any PWA made by Google? Moreover, I can’t remember encountering any webpage with offline and “installation to home screen” capabilities in the whole internets.

      1. 3

        I’ve seen pages that do the “install to home screen” thing. discourse.org is a good OSS example. I’ve never seen the works offline thing, though.

        1. 1

          Maps & Photos both have PWAs.

          1. 2

            Tried to analyze Google Maps now with Google’s own “Lighthouse” tool:

            • Does not respond with a 200 when offline

            • User will not be prompted to Install the Web App

              Failures: Site does not register a service worker.

            • Does not register a service worker

            both on mobile and desktop

            Google Photos has no third warning, it has service worker, but it probably does nothing related to “PWA” functionality.

            For Youtube, there are the same three warnings plus other, minor warnings, such as “brand colors in address bar”.

            Google Play Music refuses to load altogether, and says “open native app or go away” if it detects that browser is “mobile” (!), but on desktop, it loads, but all Lighthouse audits fail, except “Uses HTTPS”.

            I don’t think idea of PWAs is bad, it’s how the first Iphone and later Firefox OS were supposed to work, but Google’s notion of PWAs is complete bullshit, with “service workers”, “brand colors in address bar” and other nonsense. Even Google itself does not try to conform to this.

          2. 1

            I think Google Play Music and YouTube are PWAs, in chrome at least you can add to homescreen by the chrome menu.

          3. 3

            That second footnote is funny.

            1. 3
              $ curl http://pnathan.com/ | wc -c
                % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                               Dload  Upload   Total   Spent    Left  Speed
              100  7503  100  7503    0     0  25070      0 --:--:-- --:--:-- --:--:-- 25010

              no images. just html. custom-crafted static site generation. loads super fast.


              I once read a fascinating web page about the pre-HTML hypertext systems- apparently there were several, and Cern’s was the quintessential “worse is better” system, and there were far better ones. Sadly, I didn’t bookmark it, and I haven’t been able to dig it out since. I’m persuaded http and the www are evolutionary dead ends. I was amused that quic showed up with its own characteristics. Wondering if we’ll actually, in the end, reimplement OSI or other heavyweight systems, but with an extra 40 years round the block to get there. :)