On Wednesday, January 21, 2015 at 6:46:16 AM UTC+1, Tham wrote:
Went through some best practices of web standards, they suggested that, it is better to include the Javascript at the end of the body. Include the css at the start of the head.
This is only for the initial load of the HTML page, because <script src=""> block the rendering of the HTML (scripts could use document.write() and modify how the HTML after the <script> will be parsed). Putting CSS in the head allows starting loading them (in parallel) sooner so you can hopefully avoid the FOUC ("flash of unstyled content"), plus scripts block until previous stylesheets have been loaded.
Once the page is loaded however (as is the case when your onModuleLoad is run), it doesn't matter any more.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment