That is exactly what I am trying do to here...

2011/3/10 Martín Mulone <mulone.mar...@gmail.com>

> I'm thinking... this can be go very well with web2py.
>
> For example this come to my mind...
>
> in web2py
> response.scripts.insert(0,URL('static','js/jquery.js'))
> response.scripts.insert(1,URL('static','js/calendar.js'))
>
> render as
> <script>
> head.js("/path/to/jquery.js", "/path/to/calendar.js");
> </script>
>
> in web2py
> response.scripts.insert(2,'http://www.google-analytics.com/ga.js')
> response.scripts.insert(3,'''function() {
>  var tracker = _gat._getTracker("UA-20001309-1");
> tracker._trackPageview();
>  }''')
>
> render as
> <script>
> head.js('http://www.google-analytics.com/ga.js', function() {
>  var tracker = _gat._getTracker("UA-20001309-1");
> tracker._trackPageview();
> });
> </script>
>
> + More modular.
> + Insert scripts from models and controllers. (very good for plugins)
>
> 2011/3/10 contatogilson...@gmail.com <contatogilson...@gmail.com>
>
> That's what I was looking for!
>> _____________________________________________
>> *Gilson Filho*
>> *Web Developer
>> http://gilsondev.com*
>>
>>
>>
>> 2011/3/10 Martín Mulone <mulone.mar...@gmail.com>
>>
>> Very interesting
>>>
>>> 2011/3/10 Richard Vézina <ml.richard.vez...@gmail.com>
>>>
>>> Thanks to share Bruno
>>>>
>>>> Richard
>>>>
>>>>
>>>> On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha <rochacbr...@gmail.com>wrote:
>>>>
>>>>>  Head JS script loader
>>>>>
>>>>> With Head JS your scripts load like images - completely separated from
>>>>> the page rendering process. The page is ready sooner. Always. This is
>>>>> guaranteed even with a single combined JavaScript file. See it yourself:
>>>>>
>>>>> Sample page with 5 SCRIPT SRC tags<http://headjs.com/test/script.html>
>>>>>
>>>>> Same scripts loaded with Head JS <http://headjs.com/test/headjs.html>
>>>>>
>>>>> Non-blocking loading is the key to fast pages. Moreover Head JS loads
>>>>> scripts in *parallel* no matter how many of them and what the browser
>>>>> is. The speed difference can be dramatic especially on the initial page 
>>>>> load
>>>>> when the scripts are not yet in cache. It's your crucial first impression.
>>>>>
>>>>> Pages no longer "hang" and there is less or zero "flashing" between
>>>>> pages. User only cares when the page is ready. Unfortunately current
>>>>> networking tools don't highlight this crucial point. They focus on the
>>>>> overall loading of assets instead.
>>>>>
>>>>> Head JS can make your pages load 100% or even 400% faster. It can make
>>>>> the largest impact on client side optimization.
>>>>>
>>>>>
>>>>> http://headjs.com/
>>>>> --
>>>>> Bruno Rocha
>>>>> [ About me: http://zerp.ly/rochacbruno ]
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Pablo Martín Mulone (mar...@tecnodoc.com.ar)
>>> http://www.tecnodoc.com.ar/
>>>
>>> My blog: http://martin.tecnodoc.com.ar
>>> Expert4Solution Profile:
>>> http://www.experts4solutions.com/e4s/default/expert/6
>>>
>>>
>>>
>>
>
>
> --
> Pablo Martín Mulone (mar...@tecnodoc.com.ar)
> http://www.tecnodoc.com.ar/
>
> My blog: http://martin.tecnodoc.com.ar
> Expert4Solution Profile:
> http://www.experts4solutions.com/e4s/default/expert/6
>
>
>

Reply via email to