|
|
|
|
|
by gcpwnd
1495 days ago
|
|
> And how do I build offline-first web applications with HTML over the wire?!? I can't give you an perfect answer, because I am not aware of a practical example. But I think its quite doable.
In a very naive way you can just store the results locally and use them when requested while offline. That potentially increases the storage size of individual items due to the HTML overhead of course. A fairly small app with little offline content could be quite simple.
An advanced approach could be to push template parsing to the frontend. HTML fragments could use i.e. micro formats to retrieve data from the HTML and store it for later use. The question in this case how much logic you have to duplicate. I.e. template parsing should be very simple, unless you can share the template engine. |
|
Sounds more like a JS view/vue ;-)
Sure, it is possible, but then you are probably better off using a proper JS framework with SSR (server side rendering) support.