#28382Allow asynchronous JavaScript files
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></array>
Reviews 5
- TYPO3_7-6 51557[FEATURE] Support async for concatenated js files
- main 34000[FEATURE] Add async property to JavaScript files
- main 34263[FEATURE] Add async property to JavaScript files
- main 34259[FEATURE] Add async property to JavaScript files
- TYPO3_6-2 33984[BUGFIX] Add async property to JavaScript files