Feature #28382
Epic #55575: Streamline JavaScript Code in the TYPO3 Backend
Allow asynchronous JavaScript files
Status: | Resolved | Start date: | 2011-07-22 | |
---|---|---|---|---|
Priority: | Could have | Due date: | ||
Assigned To: | - | % Done: | 100% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
PHP Version: | Sprint Focus: | |||
Complexity: |
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
Associated revisions
[FEATURE] Add async property to JavaScript files
Add a property 'async="async"' to JavaScript files via TypoScript
page.includeJSlibs.<array>.async = 1
- includeJSlibs
- includeJSFooterlibs
- includeJS
- includeJSFooter
Resolves: #28382
Releases: master
Change-Id: I9a86edaba118370d4df9f11216998d808276b634
Reviewed-on: http://review.typo3.org/34000
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
History
#1 Updated by Xavier Perseguers about 4 years ago
- Subject changed from Allow asynchronously JavaScript files to Allow asynchronous JavaScript files
#2 Updated by Xavier Perseguers about 4 years ago
- Priority changed from Should have to Could have
#3 Updated by Xavier Perseguers about 4 years ago
- Target version deleted (
4.6.0-beta1)
#4 Updated by Daniel Siepmann over 1 year ago
- Parent task set to #55575
#5 Updated by Mario Colombo about 1 year ago
Come on guys... it should be possible. Google Page Speed complains about the current way page.includeJS includes javascript.
#6 Updated by Gerrit Code Review 9 months ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33984
#7 Updated by Gerrit Code Review 9 months ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34000
#8 Updated by Gerrit Code Review 9 months ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34259
#9 Updated by Gerrit Code Review 9 months ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34000
#10 Updated by Gerrit Code Review 9 months ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34263
#11 Updated by Gerrit Code Review 9 months ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34263
#12 Updated by Gerrit Code Review 9 months ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34000
#13 Updated by Gerrit Code Review 9 months ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34000
#14 Updated by Gerrit Code Review 7 months ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34000
#15 Updated by Gerrit Code Review 7 months ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34000
#16 Updated by Arnd Messer 7 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e6e9b5318fc95446ce4a4477263b0862fb953019.
#17 Updated by Clemens Riccabona 4 months ago
great, but as it seems to me, completely useless ATM if you use concatenation feature AFAICS.
and concatenation is also recommended by google.
just mention the latter to prevent anoying "concat-minify-compress" debate on principles.