Project

General

Profile

Actions

Feature #28382

closed

Epic #55575: Streamline JavaScript Code in the TYPO3 Backend

Allow asynchronous JavaScript files

Added by Xavier Perseguers over 13 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-07-22
Due date:
% Done:

100%

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

Description

Instead of evaluating Google Analytics code right away, the official snippet allows asynchronous evaluation, if browser supports it:

<script type="text/javascript">
  // code stripped
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

Add new option 'async' to PAGE.includeJS.<array>


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #62023: Allow script tags to have custom attributesClosed2014-10-03

Actions
Related to TYPO3 Core - Feature #75858: Async-option for config.concatenateJsRejected2016-04-22

Actions
Actions

Also available in: Atom PDF