Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,869 members, 7,806,477 topics. Date: Tuesday, 23 April 2024 at 05:05 PM

Eliminate Render-blocking Javascript And CSS In Above-the-fold Content - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Eliminate Render-blocking Javascript And CSS In Above-the-fold Content (1426 Views)

Learn HTML And CSS In Few Days - Step By Step Tutorial By Professionals / How To Give Access Or Permit To Every User And His Own Css In Php / Learn WebDesign Programming HTML And CSS In Awka Anambra State (2) (3) (4)

(1) (Reply) (Go Down)

Eliminate Render-blocking Javascript And CSS In Above-the-fold Content by asadul549(m): 9:59pm On Nov 07, 2016
I researched a lot about this problem. Please see my attachment. I added this script to get out of this error form google page speed insights tool. But still its showing that file. How to solve it?

<script type="text/javascript">
function downloadJSAtOnload() {
var element = document.createElement("script"wink;
element.src = "wp-content/plugins/LayerSlider/static/js/greensock.js?ver=1.11.8";
document.body.appendChild(element);
}
if (window.addEventListener)
window.addEventListener("load", downloadJSAtOnload, false);
else if (window.attachEvent)
window.attachEvent("onload", downloadJSAtOnload);
else window.onload = downloadJSAtOnload;
</script>

Re: Eliminate Render-blocking Javascript And CSS In Above-the-fold Content by asadul549(m): 4:05pm On Nov 08, 2016
Can anyone help?
Re: Eliminate Render-blocking Javascript And CSS In Above-the-fold Content by webdeveloperqx: 10:42am On Nov 09, 2016
i see that your site is on wordpress, if you want to remove the file. login via your cpanel, locate the current theme folder , navigate to functions.php file.

search for the "greenstock" and and comment that line out with "//".

that should remove the code block enqueuing that file.

hope you understand.
Re: Eliminate Render-blocking Javascript And CSS In Above-the-fold Content by jemois: 11:44pm On Dec 06, 2016
Have you tried generating the css for the sbove the fold content with services like the one from sitelocity ?

(1) (Reply)

Do You Need A Backend Developer (PHP Or Laravel) / I Am Really Disappointed / How can I effectively code a payment receipt/booking application

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.