Just for the record. If your creating a website with javascript to add
functionlity the approach of loading the javascript at the bottom is
correct. But if your site striongly depends on javascript (the case of a
webapp) the best is to load javascript as soon as you can.

Regards,

-- 
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net


On Jan 7, 2008 12:59 PM, cmbg <[EMAIL PROTECTED]> wrote:

>
> I'd like to have the page completely render, so it doesn't appear that
> the user is not arriving to the page they wanted.  When I have a lot
> of javascript files loading in the head tag, it takes awhile before
> the user sees anything.  As I was doing research on it, I found that
> putting the javascript at the bottom allieviates the problem.  Most of
> the javascript is adding events to data grids and other interactivity
> depending on the page.
>
> On Jan 7, 10:43 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > On Jan 7, 2008 10:27 AM, cmbg <[EMAIL PROTECTED]> wrote:
> >
> > > I have a large javascript (maybe 30KB) files and one of things that I
> > > want the browser to execute these files last so I put the
> > > $scripts_for_layout at the bottom of my default layout.  The problem
> > > I've run into is I also have custom css for certain views, now the css
> > > also prints outside of the head tag, which then causes the styles to
> > > be applied last.
> >
> > Why do you want the javascript to be executed last?
> >
> > --
> > Chris Hartjes
> > Internet Loudmouth
> > Motto for 2008: "Moving from herding elephants to handling snakes..."
> > @TheKeyBoard:http://www.littlehart.net/atthekeyboard
>
> >
>

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

Reply via email to