Re: [web2py] [tip] Head JS script loader

2011-04-18 Thread Martín Mulone
I didn't try it but I think you have to replace in web2py_ajax.html the
current function. Tell me if this work, Im interested in this too. (you have
to load jquery of course head.js("/path/to/jquery.js"); )

function web2py_component(action,target) {
  head.ready(function() {web2py_ajax_page('get',action,null,target); });
}


2011/4/18 pbreit 

> Are there any tricks to get this working with LOAD()? I can't seem to get
> my LOADs to work when I implement head.js. Is it because the LOAD is being
> attempted before Jquery is loaded?


Re: [web2py] [tip] Head JS script loader

2011-04-17 Thread pbreit
Are there any tricks to get this working with LOAD()? I can't seem to get my 
LOADs to work when I implement head.js. Is it because the LOAD is being 
attempted before Jquery is loaded?

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread mikech
Thanks great find!

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread Bruno Rocha
That is exactly what I am trying do to here...

2011/3/10 Martín Mulone 

> 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
> 
> head.js("/path/to/jquery.js", "/path/to/calendar.js");
> 
>
> 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
> 
> head.js('http://www.google-analytics.com/ga.js', function() {
>  var tracker = _gat._getTracker("UA-20001309-1");
> tracker._trackPageview();
> });
> 
>
> + More modular.
> + Insert scripts from models and controllers. (very good for plugins)
>
> 2011/3/10 contatogilson...@gmail.com 
>
> That's what I was looking for!
>> _
>> *Gilson Filho*
>> *Web Developer
>> http://gilsondev.com*
>>
>>
>>
>> 2011/3/10 Martín Mulone 
>>
>> Very interesting
>>>
>>> 2011/3/10 Richard Vézina 
>>>
>>> Thanks to share Bruno

 Richard


 On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha 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
>
> Same scripts loaded with Head JS 
>
> 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
>
>
>


Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread contatogilson...@gmail.com
Very good!
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*


Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread Martín Mulone
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

head.js("/path/to/jquery.js", "/path/to/calendar.js");


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

head.js('http://www.google-analytics.com/ga.js', function() {
var tracker = _gat._getTracker("UA-20001309-1");
tracker._trackPageview();
});


+ More modular.
+ Insert scripts from models and controllers. (very good for plugins)

2011/3/10 contatogilson...@gmail.com 

> That's what I was looking for!
> _
> *Gilson Filho*
> *Web Developer
> http://gilsondev.com*
>
>
>
> 2011/3/10 Martín Mulone 
>
> Very interesting
>>
>> 2011/3/10 Richard Vézina 
>>
>> Thanks to share Bruno
>>>
>>> Richard
>>>
>>>
>>> On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha 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 

 Same scripts loaded with Head JS 

 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


Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread contatogilson...@gmail.com
That's what I was looking for!
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*



2011/3/10 Martín Mulone 

> Very interesting
>
> 2011/3/10 Richard Vézina 
>
> Thanks to share Bruno
>>
>> Richard
>>
>>
>> On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha 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 
>>>
>>> Same scripts loaded with Head JS 
>>>
>>> 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
>
>
>


Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread Martín Mulone
Very interesting

2011/3/10 Richard Vézina 

> Thanks to share Bruno
>
> Richard
>
>
> On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha  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 
>>
>> Same scripts loaded with Head JS 
>>
>> 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


Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread Richard Vézina
Thanks to share Bruno

Richard

On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha  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 
>
> Same scripts loaded with Head JS 
>
> 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 ]
>
>


[web2py] [tip] Head JS script loader

2011-03-09 Thread Bruno Rocha
  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 

Same scripts loaded with Head JS 

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 ]