rkd77 / elinks

Fork of elinks
Other
335 stars 35 forks source link

Elinks started showing html before transitioning to page #260

Open 0-issue opened 1 year ago

0-issue commented 1 year ago

This started with latest commit and does not happen on or before https://github.com/rkd77/elinks/commit/208be9b631299d4c46d0e53a0b078b9c382e5a48. elinks now shows partial html before rendering the webpage. Please check the video, it shows following string before showing rendered page.

<html xmins="http://www.w3.org/1999/xhtml" la

https://github.com/rkd77/elinks/assets/25681815/7d94113c-40bc-40f5-9499-65b820a1d127

0-issue commented 1 year ago

Update: doesn't always happen. Not sure if it happens only when internet is slow. Anyway, I had tested elinks prior to https://github.com/rkd77/elinks/commit/208be9b631299d4c46d0e53a0b078b9c382e5a48 in same slow internet setting and links too, it didn't happen for them.

rkd77 commented 1 year ago

And finally page is rendered correctly or not? Gradual rendering is from the begining, when networks were slower. I guess that for brotli compressed sites, it does not happen, because brotli is decompressed in one shot. At least in elinks implementation, I don't know how it is in libcurl. If brotli works fine, the same trick could be done for gzip and zstd. Decompress all at once, but first someone must confirm, that is true.

0-issue commented 1 year ago

@rkd77 I was actually going to comment on it yesterday... The page is correctly rendered at the end. Yes, I tried elinks in super slow network recently, and what I observe is that each element's html is first displayed (perhaps because it's not fully fetched yet) and then rendered. The good thing about it is that there is visual feedback, as there isn't a progress bar shown for most websites. This issue can be closed, or if you feel like... another visual cue would be to show a placeholder like "fetching/rendering " instead of showing the actual html snippet.