How to fix “Eliminate render-blocking JavaScript and CSS in above-the-fold content” in joomla

Tags: javascript,css,joomla

Problem :

I'm using Joomla to develop my website, and when I test my website on PageSpeed Insights on Google, it generates the following must-fix warning for me:

Eliminate render-blocking JavaScript and CSS in above-the-fold content.

How to do this in Joomla? I did try to use extension to move the JavaScript down, but it's resulting in errors in the layout, and breaking the responsive functionality on my website.

Solution :

The problem with JCHOptimize is that it's hard to get it to increase your Google PageSpeed Insights rankings on your website without it breaking other stuff.

In order to address these issues, you will need to work on 2 areas, CSS and JavaScript.

For the CSS, you will need to split your main CSS file to 2 parts: The first part is the one that you will absolutely need to make your website look well when it first loads (for example, the width of the body), while the second part is the one that you can live without for a second or so (until the page fully loads).

As for the JavaScript, you will need to add async to the JavaScript libraries that are not necessary during pageload, and you will need to get rid of all the JavaScript libraries that you don't need.

In my opinion, trying to get something over 85 with Google PageSpeed Insights is overkill and is not really necessary. I know that most people strive for a 100, but for many, this number is technically impossible (we've seen it though on a few websites).

    CSS Howto..

    how to place div next to centered div css

    How can I change the ckeditor iframe CSS styling

    what is jquery CSS frame work and how to use the frame work for giving look and feel to the website? [closed]

    How to vertically center h1 and span in a li

    Show Item when Hover Over Parent

    How to shift divs “up” in an order after deleting hiding a div with jquery/css

    How to change menu from on hover to on click

    CSS: How to create a button with an arrow placedo on the right

    Is this how CSS LESS and SimpLESS work? [closed]

    How to prevent exceeding the parent's boundary?

    How to set min-font-size in CSS

    How to create multiline ListBox in GWT?

    How do I center (vertically and horizontally) buttons in a div tag?

    CSS: how to apply margin to a container with floats?

    How to prevent inner text resizing in CSS Animation @keyframes?

    CSS show div background image on top of other contained elements [duplicate]

    How can I base one CSS setting on another?

    How to scale a website for mobile devices?

    How to select elements using CSS selector who's attribute can have multiple values

    Rails4: How to create Image Links with Hover?

    How to set css error-styles programatically on a TextBox

    How to set class on div that is inside of repeater in code behind?

    Flex: How to embed fonts with CSS

    How to arrange div as a dock panel?

    How to set CSS property in adjacent elements?

    How to separate CSS positioning from CSS styling?

    How to do the right positioning of css elements?

    How to add code into a page with a lot of conflicting CSS, without using Scoped CSS?

    How to apply a transition effect to some text when hovering over an icon?

    How to force a button inside a div not to inherit the parent CSS?