question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Page not fully rendered (Compression + HTML builder)

See original GitHub issue

I put brackets on Compress and HTML builder because I’m not completely sure of what is happening.

The problem appeared on some pages generated from markdown files through HTML builders. The MD files are parsed and transformed into HTML with a third party library. This HTML is then injected into HTML builders using an unsafe block. MD files, and by extension unsafe content, can be quite big.

When loading pages from a browser they often appear to be only partially rendered even though the HTTP code is 200.

My current intuition, after some debugging and with a partial knowledge of ktor internals, is that the bug comes from the combination of Compression feature and big html streams. At one moment, the html stream uses some BufferedWriter and the compression takes the content of buffer and ends the HTTP request even if the content as not complete the html generation.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cy6erGn0mcommented, Nov 11, 2018

Workarounded in 1.0.0-beta-4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reduce the size of HTML, CSS, JavaScript, PHP and Smarty ...
For example using FireFox, drop the file in a new tab. If the file displays the characters correctly, check the menu View /...
Read more >
Tips for authoring fast-loading HTML pages - MDN Web Docs
Large images cause your page to take more time to load. Consider compressing your images before adding them to your page, using compression...
Read more >
How to Optimize HTML to Boost Web Performance
Unoptimized HTML can slow down your site. Learn the best practices to optimize your HTML and boost web performance.
Read more >
How To Eliminate Render-Blocking Resources
Discovering critical render-blocking resources and repairing them can significantly boost your SEO. Read on to learn how.
Read more >
How to Enable GZIP Compression for Faster Web Pages
Learn how GZIP compression works to deliver web pages to browsers more quickly, and how to activate it on your web server.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found