elinks icon indicating copy to clipboard operation
elinks copied to clipboard

Elinks started showing html before transitioning to page

Open 0-issue opened this issue 2 years ago • 3 comments

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 avatar Aug 08 '23 22:08 0-issue

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.

0-issue avatar Aug 08 '23 22:08 0-issue

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.

rkd77 avatar Aug 23 '23 19:08 rkd77

@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 <element_name>" instead of showing the actual html snippet.

0-issue avatar Aug 24 '23 03:08 0-issue