Is it possible to run WebPerl inside a PWA?

Without having the time to test this, but having written several PWAs myself, I think that this should work. The way PWAs work is that they have a "service worker" that can intercept requests to the server and can decide whether to respond with files from the local cache instead, thus enabling them to work offline too. So I think they should also be able to intercept and cache the requests to the WebPerl files. Here is one of the service workers I wrote and the resources on MDN you linked to are very good.

Has it been attempted yet? What are the results? Does it reduce the startup time of Perl because it's running hot in the background?

Sorry, I don't know the answers there :-( For the latter, a PWA alone doesn't automatically mean Perl keeps running in the background - one would have to fire up an interpreter in a Web Worker, independently of whether it's a PWA or not. I could imagine tiny speedups from the responses for the WebPerl files always coming from the local cache, and perhaps storing the uncompressed WebPerl resources instead of having to uncompress the gzipped server responses, but it's still those same megabytes that have to be passed around, so I have my doubts...


In reply to Re: WebPerl in a Progressive Web App? by haukex
in thread WebPerl in a Progressive Web App? by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.