Feature #38951

Add config.deferJS for defer parsing of javascript

Added by Dominic Garms 10 months ago. Updated 22 days ago.

Status:New Start date:2012-07-14
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:Performance
Target version:-
TYPO3 Version:6.0 Complexity:
PHP Version:
Votes: 1 (View)

Description

Hello,

it would be nice, if Googles "defer parsing of javascript" find its way into the core of TYPO3.

config.deferJS = TRUE / FALSE

Here is the reference link: https://developers.google.com/speed/docs/best-practices/payload#DeferLoadingJS

<script type="text/javascript">

 // Add a script element as a child of the body
 function downloadJSAtOnload() {
 var element = document.createElement("script");
 element.src = "deferredfunctions.js";
 document.body.appendChild(element);
 }

 // Check for browser support of event handling capability
 if (window.addEventListener)
 window.addEventListener("load", downloadJSAtOnload, false);
 else if (window.attachEvent)
 window.attachEvent("onload", downloadJSAtOnload);
 else window.onload = downloadJSAtOnload;

</script>

Also available in: Atom PDF