tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davor Hrg (JIRA)" <...@tapestry.apache.org>
Subject [jira] Commented: (TAPESTRY-2364) YSlow Recommendation: Write Scripts at bottom of page
Date Tue, 07 Oct 2008 10:09:44 GMT

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

Davor Hrg commented on TAPESTRY-2364:


I agree that this should be considered as optional,
but the default should be scripts at bottom.

and another solution with considering the users without js

add this script as first line after body:
<script>document.body.style.visibility = "hidden";</script>

and this script at the bottom (after doing your DOM magic)
<script>document.body.style.visibility = "visible";</script>

this will have no effect for users with disabled js
it will make content hidden until it is modified by the script
it will work no matter if scripts are in HEAD or at bottom
this approach can even be used in combination with classic onload
(before this last snippet of course)

> 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
>         Attachments: sayHello.js, TestFast.html, TestSlow.html, TestSlow.html
> 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

View raw message