By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,454 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Eliminate render-blocking css in google page speed insights

P: 1
I am frustrating css rendering problem. According to Google PageSpeed Insights, My website speed is 71/100. I can remove almost error but I can't solve css rendering problem.
Expand|Select|Wrap|Line Numbers
  1. Your page has 1 blocking CSS resources. This causes a delay in rendering your page. 
Actually my website has only one minified css file. When I search google, they suggest me to keep css files in head section and js files in above closing body tag, but it doesn't work. I try using all method and ideas which are found in google. Async or defer to js file doesn't work for me. Using noscript tag to css, css doesn't work. I try calling css from document.write function, still it doesn't work. I try removing inline css and all js file, but problem can't be solved. According to google page speed insights suggestion I include following code.
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. var cb = function() {
  3.     var l = document.createElement('link'); l.rel = 'stylesheet';
  4.     l.href = 'krishisansar.com/css/camera.min.css';
  5.     var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h);
  6.   };
  7.   var raf = requestAnimationFrame || mozRequestAnimationFrame ||
  8.       webkitRequestAnimationFrame || msRequestAnimationFrame;
  9.   if (raf) raf(cb);
  10.   else window.addEventListener('load', cb);
  11. </script>
but it is also helpless.

Many WordPress expert advice to use plugin, but my website doesn't use any platform like WP. I know, if I can fix this error, website speed will increase. How to fix this error ? Does css structure affect in this case ?
Feb 23 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.