Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the JavaScript in the BODY instead of in the HEAD #52

Open
oliverklee opened this issue Dec 13, 2016 · 1 comment
Open

Include the JavaScript in the BODY instead of in the HEAD #52

oliverklee opened this issue Dec 13, 2016 · 1 comment

Comments

@oliverklee
Copy link
Contributor

The JavaScript should be included in the bottom of the BODY, not in the HEAD. This is for two reasons:

  1. The loading/parsing of the HTML after the JavaScript is blocked until the JavaScript is loaded and executed. So it is recommended to put the JavaScript last thing in the BODY so that the page can be displayed quicker.
  2. mkforms will break if other extensions provide jQuery and include it the BODY (as recommended) instead of in the HEAD.

In TYPO3, jQuery & Prototype should be included with page.includeJSFooterlibs, and non-library mkforms stuff be included with page.includeJSFooter:
https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Page/Index.html

@hannesbochmann
Copy link
Member

Feel free to provide a pull request. We don't have free time for this right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants