On Wednesday, December 23, 2015 at 9:31:57 PM UTC-5, 
luis.vallada...@metamaxzone.com wrote:
>
> Okay this is a really great idea and i can use it perfectly, but i wonder 
> (only for making it easy to me) if there is a way to do this with a 
> javascript that depends of the data associated with the page request? maybe 
> a way to pass all the params recieved by the view from the controller to my 
> server_js method in order to pass this parameters also to the .js file.
>

If the JS depends on data specific to the page, then there is probably not 
much benefit to caching it separately -- you might as well just cache the 
whole page. If the page isn't cacheable due to constantly changing data, 
then by definition neither is the JS, which also depends on that data.

Anyway, passing the data to the serve_js function solely via URL can be 
tricky -- that will only work for simply data structures such as strings 
and integers (e.g., you can't pass a Rows object via URL).

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to