• Resolved hrassistant

    (@hrassistant)


    Need help with understanding and fixing a problem that I discovered recently on my site.
    The size of the HTML code of all the pages increased dramatically from a previous version. The average size of the HTML code is now about 460 kbyte for each page but most of it is not content. If I look at the source code of any of my site pages, I find a very big style sheet that starts with:

    <style type=”text/css” media=”all”>div.wpcf7{margin:0;padding:0}div.wpcf7-response-output{margin:2em 0.5em 1em;padding:0.2em 1em}div.wpcf7 .screen-reader-response{position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);height:1px;width:1px;margin:0;padding:0;border:0}div.wpcf7-mail-sent-ok{border:2px solid #398f14}div.wpcf7-mail-sent-ng{border:2px solid #ff0000}div.wpcf7-spam-blocked{border:2px solid #ffa500}div.wpcf7-validation-errors{border:2px solid ………….
    …..
    I stop here as it is very very long.
    You can directly check it by looking to the source code of my site “http://hr-assistant.it&#8221;. I posted on WordPress.org and I got the suggestion to contact you as the problem may be related to the Contact Form 7 plugin.

    This code is not present in the HTML code generated by the development version of the site that I have on another server (that as well uses Contact Form 7). I am struggling to find why it is there and to understand if I can eliminate it from most of the pages (except the contact form) or have it be loaded from the server at load time.
    If I deactivate the plugin the above code does not disappear.

    Your help is highly appreciated.

Viewing 1 replies (of 1 total)
  • Thread Starter hrassistant

    (@hrassistant)

    Solved! It was due to the setting of the option “Load CSS asynchronously” of the plugin “Async JS and CSS settings”. The default loading method was in fact “Inserting all CSS styles inline into the document HEADER”.

Viewing 1 replies (of 1 total)

The topic ‘style sheet bloats HTML’ is closed to new replies.