Hi,
does this really belong to the developers list?
Lets try to bend it here :-)

I wonder if that is a good idea. Sure it helps, but this solution always
moves all the javascripts to bottom. What about code that needs the script
to appear before the bottom?
Even if not used directly, what about code that triggers on click and on
mouseover?

The only feasible solution I see is that you need the possibility to tag you
javascripts. Those you know which can be safely put to the bottom of the
page.

Especially as performance gets an issue at the end of a project, not at the
beginning it will be very hard to make it possible to move ALL scripts to
bottom.

So +1 for adding an option to control via yml or addJavascript() where the
script should go.

.: Fabian

-----Original Message-----
From:
[EMAIL PROTECTED]
om
[mailto:[EMAIL PROTECTED]
groups.com] On Behalf Of Michel Weimerskirch
Sent: Dienstag, 25. März 2008 17:35
To: [email protected]
Subject: [symfony-devs] Re: Front end optimization: Adding javascripts on
the bottom of the page


You can just put the following at the end of your
apps/myapp/template/layout.php (right before </body>):
<?php echo get_javascripts() ?>
There is no need for a partial, nor to remove existing javascripts.

Michel

On 3/25/08, Marijn <[EMAIL PROTECTED]> wrote:
>
>  So I could just add some PHP code in a partial that would be included
>  on the bottom of every template. The parial would first call
>  get_javascripts and then delete all javascripts from the sfResponse
>  object..?
>
>  Thanks for your quick reply.
>
>
>  Marijn
>
>
>  On Mar 25, 4:56 pm, Robert Speer <[EMAIL PROTECTED]> wrote:
>  > try get_javascripts ()
>  >
>  > the api is easiest to search here:http://www.gotapi.com/symfony
>  >
>  > On Mar 25, 10:18 am, Marijn <[EMAIL PROTECTED]> wrote:
>  >
>  > > Hi everybody,
>  >
>  > > I think this is question belongs in the developer list, if not please
>  > > be kind enough to tell me ;-)
>  >
>  > > Currently Symfony adds javascripts in the head tag of the page but I
>  > > prefer to put them on the bottom of the page for faster rendering
>  > > content on the page. For more information about that you can check
out
>  > > this link from Yahoo on front-end
optimizationhttp://developer.yahoo.com/performance/rules.html#js_bottom(pret
ty
>  > > useful I'd say).
>  >
>  > > Is this something that can be considered as an option within symfony
>  > > or do I need to hack my way through this. If so where to start..? A
>  > > quick peek at the source didn't result in to much insight on the
>  > > addJavascript function.
>  >
>  > > Thanks,
>  >
>  > > Marijn
>  >
>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to