how to solve Eliminate render-blocking JavaScript?

More
3 years 9 months ago #8732 by migors
migors created the topic: how to solve Eliminate render-blocking JavaScript?
How to let js files load at the end of page? I found a script to place in index.php and define how to load js files.
<script type="text/javascript">
function downloadJSAtOnload() {
var element = document.createElement("script");
element.src = "defer.js";
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>

can i solve this problem in some way? witch file defines how loads compressed js files?

And is there some way to Leverage browser caching for compressed js files?
for some reason there is 2 of them???

Please Log in or Create an account to join the conversation.

More
3 years 9 months ago #8735 by artur
artur replied the topic: how to solve Eliminate render-blocking JavaScript?
Hello,
I'm afraid this is not possible in Joomla.
Some of the scripts can not be loaded at the end of page (example jQuery library).

Our framework EF4 have option to compress HTML, CSS and JS. Please check template options. In version 4.6 you have also option to enable JS deferring.

This is all we can do in Joomla CMS.

Regards.

Please Log in or Create an account to join the conversation.

More
3 years 9 months ago #8741 by migors
migors replied the topic: how to solve Eliminate render-blocking JavaScript?
could you say what is this file cdnjs.cloudflare.com/ajax/libs/picturefi...1/picturefill.min.js

can i store it on server to reduce http requests?

Please Log in or Create an account to join the conversation.

More
3 years 9 months ago #8744 by artur
artur replied the topic: how to solve Eliminate render-blocking JavaScript?
Hello,
This file is related with DJ-Mediatools extension.
You can not change file localization without modifications.
But, storage this file locally is worse, than use CDN.

More details in article :
www.sitepoint.com/7-reasons-to-use-a-cdn/

Regards.

Please Log in or Create an account to join the conversation.

Time to create page: 0.227 seconds

INDICO S.C.

ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2019 Joomla-Monster.com All rights reserved.

Joomla-Monster.com and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.