HTML settingsAccelerator for WordPress

settings-HTML

General#

  • Minify

    Optimizes HTML code to have a smaller size.

  • Early paint

    Forces the page’s biggest part to being painted as earlier as possible.

Fix markup#

  • Basic

    Corrects the most common and simple errors like unescaped tags in scripts.

    • Embedded scripts and styles encoding correction

      Determining encoding of assets and converting it to HTML’s encoding.

  • Additional

    Tries to normalize HTML markup and correct missed or wrong placed tags.

  • Advanced by ‘Tidy’

    Tries to normalize HTML markup and correct missed or wrong placed tags by special PHP extension ‘Tidy’. This extension should be enabled on the hosting before use.

    Warning. It can break some tags and should be used if necessary.

Comment exclusions from minification#

Sometimes HTML comments can contain some metainformation that is needed for page display. In this section such comments can be excluded from minification by adding regular expression patterns.

Lazy load#

A special efficient technology for speeding up the loading of very large numbers of DOM elements. It is configured for each site individually.

Here you can specify which parts of the pages, via their XPaths, should be lazy loaded. Since XPath language it is an analogue of CSS, it allows you to make settings both for individual pages and for their set, using the principle of CSS selectors (classes, tags, properties, …).

For example, here is a page with some HTML code:

<!DOCTYPE html>
<html>
<body class="home">
<div>...</div>
<div>...</div>
<div>...</div>
</body>
</html>

And then, for example, so that on all pages everything that comes after the second div block, loaded lazily, you need to add the rule (.//body/child::div)[2]/following-sibling::*.

Or, for example, if you need to do this only for pages that have a home class in the body tag and the div tag is not important, the expression will be (.//body[contains(concat("", normalize-space(@class), ""), " home "]/child::*)[2]/following-sibling::*.

Leave a Reply