Comment 22 for bug 244250

Damian Yerrick (tepples) wrote :

A web server is supposed to retrieve data from database, run application logic, write back to database if needed, write an HTML document or JSON object to output, and wait for the next request. Ideally, it's stateless between requests.

A desktop application, on the other hand, is more likely to have a lot of state in RAM that isn't persisted to the file system. In particular, you can't "simply restart" a web browser because when a browser restarts, it retrieves the HTML document open in each tab as if the user had navigated to it again. This incurs data loss in two ways:

1. If the user is offline, pages open in tabs for later reading will be replaced with "Cannot find server" error pages. (Chromium, for example, shows the "downasaur" minigame.) I often do this on my laptop so that I have something to read while riding the bus to work or wherever.
2. Several web applications, such as comment composition forms on Slashdot, lose DOM state if closed. When the browser navigates to the page again, the DOM is reset to what it was when the page was first opened, and the comment that the user was composing is lost. I imagine any webmail site that doesn't automatically save drafts in the background has the same problem, and even those that do save drafts will have a problem if the user is offline and the site doesn't use a Service Worker.