4 ms·
But what?
by The_suffocated 9y ago
But what?
- ErunamoJAZZ 9y agoPage never end to load.
- lhorie 9y agoIt breaks when you press `esc`. Either that, or the DOM just keeps growing and hogging memory until the tab eventually becomes unresponsive or crashes
- The_suffocated 9y agoThanks, but isn't this the same if you use a virtual DOM? Is Mithril not prone to this problem if you keep adding stuffs to the list?
- lhorie 9y agoWith javascript you can keep an EventSource connection open (which is immune to the `esc` thing), and you can prune the DOM and let the browser GC.
- The_suffocated 9y agoThanks for the explanation. I'm too green to understand this, but I'll try to learn more about it later.
- wybiral 9y agoPresumably you'll eventually write something rather than lurking for hours and then it'll refresh.
- roywiggins 9y agoIn extremis a <meta refresh> could be used.
- reificator 9y agoBut then if you refresh every ten minutes or so, and I just happen to be finally responding after that long, I'm going to lose what I'm typing.
- myfonj 9y agoNot necessarily: browsers are pretty good at keeping form elements state across refreshes nowadays, especially Firefox. Cursor position perhaps, but not text.
- reificator 9y agoPerhaps, but certainly there will be frustration there. Especially WRT cursor position changing.
- lhorie 9y agoI mean, sure, it works just fine if people refrain from doing certain arbitrary things (such as the scripted spamming that's happening as I write this), but that's why the grandparent comment said it was a hack and not a trick that one might want to attempt in production.
- wybiral 9y agoThe spam had nothing to do with not using Javascript. I could easily have added a CAPTCHA or required accounts.
- sebazzz 9y agoMy Surface tablet got warmer and warmer on my lap.