You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Onno Scheffers (JIRA)" <de...@tapestry.apache.org> on 2008/10/06 19:13:44 UTC

[jira] Commented: (TAPESTRY-2364) YSlow Recommendation: Write Scripts at bottom of page

    [ https://issues.apache.org/jira/browse/TAPESTRY-2364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637142#action_12637142 ] 

Onno Scheffers commented on TAPESTRY-2364:
------------------------------------------

I think the external libraries, especially the Prototype libs should always be included in the head section. Otherwise it is impossible to execute Javascript before the page renders, assuming developers are allowed to use Prototype in their own scripts as well.

Prototype included the dom:loaded event for a reason: This feature is used a lot!
If you want to create webpages that work without Javascript, you typically render plain HTML and then modify the HTML with Javascript before rendering, so you can give people with Javascript a better user-experience.

When all scripts are added to the end of the page, like it is now, the page is rendered before all resources are loaded and the user sees things (s)he wasn't supposed to see (like areas collapsing etc.).

I've seen quite a few complaints about it on the mailinglist already and some people are including the libraries twice into their pages now to work around problems. If there's hardly a difference in YSlow, then why make things more complex for developers than they need to be?

> YSlow Recommendation: Write Scripts at bottom of page
> -----------------------------------------------------
>
>                 Key: TAPESTRY-2364
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2364
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: Howard M. Lewis Ship
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>             Fix For: 5.0.12
>
>
> Tapestry is already doing a good job on this, by writing the dynamically generated <script> block at the bottom of the page, but the external scripts should also be down there.
> http://developer.yahoo.com/performance/rules.html#js_bottom

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org