Hi Bruno , I agree with you for the first 17 lines , but after that it is just regular javascript/jquery code !! Furthermore what is done in these first 17lines is indeed parsed but could have been put somewhere else ( in layout.html for ex, or in in another file that has to be included in your custom layout) . Spliting the js part into another file may actually shrink this web2y_ajax by 70% i guess( i agree that on the overall page once generated it may not be that big ) . Savng bandwidth and processing time is not useless for these applications and even if i don't expect my apps to experiment high load maybe other could get better results. Don't you think ?
On Fri, Oct 1, 2010 at 1:13 AM, Bruno Rocha <[email protected]> wrote: > Correction: > 'web2py_ajax.html' does not have string interpolation, this have to be > parsed by web2py template system, because uses {{=xxxx}} notation to build > scripts. > > 2010/9/30 Bruno Rocha <[email protected]> >> >> In layout.html you can call external JS files using: >> >> {{response.files.append(URL(request.application,'static/js','javascriptfile.js'))}} >> Scripts are also loaded dinamicaly by 'web2py_ajax.html' which builds the >> JS script at runtime, as this uses string interpolation to build scripts, >> this could not be stored in a separate file. >> I guess thats the reason. >> 2010/9/30 Manu <[email protected]> >>> >>> Hi, >>> >>> What is the reason to not have these functions into a dedicated >>> external file. By including it in the html page we can't use the >>> browser cache and we need to transfer it again and again , sounds me a >>> waste of time transfer and bandwidth. As i am not a web expert ( i am >>> actually learning with web2py !! great tool to do that too ), i was >>> wondering if there is a specific reason ? >>> >>> Thx >> >> >> >> -- >> >> http://rochacbruno.com.br > > > > -- > > http://rochacbruno.com.br >

