Well, both of you are right.

Embedding the js on the page reduces the number of files needed, each
of which has a round-trip cost.   If you can get down below 4 files,
everything can download in parallel on most browsers.

But in general the way that people who are maximizing page render
speed do it is to join and pack all their JS files, as well as joining
several images into one larger image, and displaying it in pieces via
CSS trickery.

--Mark Ramm

On Wed, May 6, 2009 at 10:52 AM, Jorge Vargas <[email protected]> wrote:
>
> On Mon, May 4, 2009 at 8:16 PM, Sam <[email protected]> wrote:
>>
>> On the other hand:
>>
> on the other other hand.
>
>> - if you are not importing the external file on multiple pages
>> (allowing caching)...
>
> if you compress and pack your JS
>
>> users will have a faster experience if you embed your javascript.  :)
>>
> your users will have an even faster experience :0
>
>> But, yeah, it can be ugly.  I agree.
>>
>> On Apr 30, 9:28 pm, Jorge Vargas <[email protected]> wrote:
>>> On Thu, Apr 30, 2009 at 8:13 AM, guistebal <[email protected]> wrote:
>>>
>>> > Thank you... CDATA solves the "problem" or, more exactly, my awfully
>>> > bad way of mixing things :)
>>>
>>> > Importing the code from an external file is definitely a nicer cleaner
>>> > way.
>>
>> >
>>
>
> >
>



-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to