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 -~----------~----~----~----~------~----~------~--~---

