thats the performance aspect; there's also the robustness / maintenance
aspect --- if you copy js into (say) 40 files, and you enhance, or fix a
small bug.... it is a nightmare -  don't copy/paste code (in general) unless
there is some compelling reason.

On Thu, Oct 1, 2009 at 10:02 AM, Pynthon Pynthon <[email protected]>wrote:

> Thanks, so if I'm going to build something like MySpace in web2py (just as
> example) it would be better to put it into one file? And does web2py support
> this or would take that a lot of tweaking?
>
> 2009/10/1 mdipierro <[email protected]>
>
>
>> It is a tradeoff. If you have a lot of JS code that does not change
>> over time you want it in a separate file so that it gets cached and
>> not requested all the time. If you have very small JS than it is
>> better to embed it in the page so that you save from checking with the
>> server if the file has been modified since last download.
>>
>> On Oct 1, 9:51 am, Pynthon Pynthon <[email protected]> wrote:
>> > Hello
>> >
>> > A long time ago I read something about putting javascript in one
>> specific
>> > page instead putting it in every page again. But why is this better?
>> Because
>> > if takes less size. Maybe there are also other good things about it but
>> that
>> > was the first one I thought about. However, do you think this is a good
>> > idea? I'm just someone who is playing with web2py and other languages so
>> > please do blame me if it is a wrong idea.
>> >
>> > Thanks
>>
>>
>
> >
>

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

Reply via email to