Content-first optimization

The problem

Many pages contain JavaScripts that must be loaded and executed before the text and images that are contained in the page can be displayed. This can delay rendering for a
few seconds. Trying to bypass this problem by moving java-scripts to the end of the page is likely to introduce bugs, and thus is not recommended.

The solution

HtmlSpeed solves this problem by using the content-first optimization technique that we have developed. First an iframe occupying the entire window is displayed above the
page. The iframe displays the page in a mode in which all JavaScripts are skipped, to allow the content of the page to be immediately rendered. Meanwhile bellow the iframe, the entire page is parsed and rendered and its JavaScripts are executed. When the browser finishes parsing the page, the iframe is removed and the full page is revealed.

The effect of the content-first optimization is a much faster page loading and improved user experience.