Project

General

Profile

Actions

Feature #38951

closed

Add config.deferJS for defer parsing of javascript

Added by Dominic Garms over 12 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Performance
Target version:
-
Start date:
2012-07-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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>

Actions

Also available in: Atom PDF