Topic on Project:Support desk

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

7
Subfader (talkcontribs)
88.130.87.202 (talkcontribs)

Just forget it.

I have tried exactly the same a few days ago; if you speak German I can link you the thread from the German WP. It is just not possible - at least not in a reasonably maintainable way.

I cannot say why Google does not complain for the WP page, but in my tests it already was enough to place any style defintion in the HTML directly. Then Google was happy. That this style did not apply to content above the fold, was not interesting for Google. Also that all the other styles, which did apply above the fold, still were in the blocking stylesheet also was not interesting for Google. I had not improved the situation, but Google did no longer show the error. To cut a long story short: Do not give much about Google's warnings in this regard. They don't mean much.

Google will already give a way better score, if the different JavaScripts were concatenated into one instead of into four files. This will also save a few connections on load. At least that would be what I would try fixing first. However, I do not know, how RL internally decides to merge or not to merge different styles. It might be that, if we just always merge everything, we later have way more entries in cache, which in fact are hardly ever used as they are to special...

79.228.77.210 (talkcontribs)

Hi, yes I'd be interested in the deutsche Diskussionsseite :)

The WP article seems to have been a bad example. Here is also JS load.php in the head. This and the script tags cannot be moved to the bottom?

Stefahn (talkcontribs)

I'm interested in the mentioned thread from German Wikipedia, too.

Would like to get rid off some render-blocking warnings, too

5.15.251.89 (talkcontribs)

You may try sitelocity.com The tool generates the css for the above the fold part of the website and you only have to place it into the head tag. Also, it will generate a single css file which it builds from all your css files and use thr provided code to load it after the initial page load. I managed to get 99 on google page insights. Cheers

Hevoxic (talkcontribs)

Simply put this in your .htaccess file and save it.

<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">

Header set Cache-Control "max-age=84600, public"

</filesMatch>

## EXPIRES HEADER CACHING ##

<IfModule mod_expires.c>

ExpiresActive On

ExpiresByType image/jpg "access 1 year"

ExpiresByType image/jpeg "access 1 year"

ExpiresByType image/gif "access 1 year"

ExpiresByType image/png "access 1 year"

ExpiresByType text/css "access 1 month"

ExpiresByType application/pdf "access 1 month"

ExpiresByType application/javascript "access 1 month"

ExpiresByType application/x-javascript "access 1 month"

ExpiresByType application/x-shockwave-flash "access 1 month"

ExpiresByType image/x-icon "access 1 year"

ExpiresDefault "access 2 days"

</IfModule>

## EXPIRES HEADER CACHING ##

Source http://blogmetric.org/eliminate-render-blocking-javascript-css/

John45709 (talkcontribs)