On Dec 7, 2011, at 16:12 , Fabien Potencier wrote:

> On 12/7/11 3:52 PM, Lukas Kahwe Smith wrote:
>> Hi,
>> 
>> was just talking to people on IRC when I realized we have a great 
>> opportunity to reuse the way we make ESI available in twig templates to also 
>> support loading via javascript. this is a great way to be enable quick 
>> loading of the page and then loading slow and/or personalized content later 
>> while the user can already read the main content of the page.
>> 
>> this is how we define that a block can be loaded via ESI if a reverse proxy 
>> is available:
>> {{ render(..., ['standalone': true]) }}
>> 
>> but we could use the same API for javascript:
>> {{ render(..., ['async': true]) }}
>> {{ render(..., ['sync': true]) }}
> 
> Can you tell us more on how it would work?


Similar to how with 'standalone' it would return an ESI tag, with this it would 
return the necessary Javascript code to call the given URL.
There is one difference here of course in that this would need some adjustment 
because it couldn't use the _internal routes as we do with ESI, so the user 
might need to take additional step for security.

Again here is what SonataPageBundle does:
https://github.com/sonata-project/SonataPageBundle/blob/master/Cache/JsCache.php#L61

regards,
Lukas Kahwe Smith
m...@pooteeweet.org



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to