Please check the release notes; this was an intentional change, since
some browsers (IE) are overly sensitive to the order of tags inside
<head>.

However, it does seem odd here that the CSS is placed after the
<script> tags, and not before, as placing them first would encourage
parallel loading (the browser has to load all <script> before
continuing to load the rest of the page and render, as the <script>
could write into the document).

Hm.

According to this:

https://issues.apache.org/jira/browse/TAP5-1486

The CSS <link>s should be ordered before the <script>s.

So its possible somethings wrong here.


On Tue, Jan 31, 2012 at 5:45 PM, hien <h.t...@gns.cri.nz> wrote:
> Hi,
>
> I am upgrading from tapestry 5.2.5 to 5.3.1 and have noticed that scripts
> already in the head of the tml affect the placement of imported scripts
> using JavaScriptSupport class in 5.3.1.
>
> I have a <script> element within a <head> element in the .tml, and I am
> using components in that page which have javascript imports using
> JavaScriptSupport.  I have noticed that tapestry groups all the <script>
> elements together (including the <script> element from the tml) and places
> them before the  stylesheet links (also using JavaScriptSupport to import
> the css).  From the tapestry docs, its states that "With Tapestry 5.3 and
> later the new elements are inserted at the bottom of the <head> element",
> however this is not the case, the scripts appear before the css links and
> are all grouped together. This is a problem for me because all the scripts
> are nested inside the conditional comment together with the script from the
> head.
>
> This is what the tml looks like (The ConditionalComments component renders
> markup for conditional comments):
>
>
>
> One of the components used in the tml:
>
>
>
> The rendered page:
>
>
> If I remove the <script> element for the <head> of the tml everything works
> as it should. The css links are placed before the script links, and the
> script links are on the bottom of the <head> element. But I need the script
> to be enclosed in a conditional comment.
>
> Before the upgrade (5.2.5), the imported scripts werent grouped with the
> existing script from the head. Is this a potential bug? Should the placement
> of the imported scripts not be affected by the scripts already in the head?
>
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/scripts-in-head-affect-placement-of-imported-scripts-in-tapestry-5-3-tp5446328p5446328.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to