response.static_version is the answer for static files cache. As for gzipping, the default static serving function checks for compressed files (.gz) and if they are present it serves them instead of the original one. There's a script too to prepare those https://github.com/web2py/web2py/blob/master/scripts/zip_static_files.py
As for gzip support for compressing the html of your dynamic page, there's nothing ready, but adapting something shouldn't be hard. On Sunday, March 3, 2013 12:46:59 PM UTC+1, Paolo valleri wrote: > > Hi Alec, > if I were you I would remove the 'inline' parameter from both > response.optimize_css response.optimize_js, just to keep the page lighter > and to leverage on the browser cache for the external resources. > Moreover, +1 for having something 'automatic' for using somehow the > browser cache, in this case the 'somehow' is not clear to me yet. > > Paolo > > On Sunday, March 3, 2013 5:51:29 AM UTC+1, Alec Taylor wrote: >> >> Going through the Google PageSpeed Insights report >> (https://developers.google.com/speed/pagespeed/insights) to see what I >> should optimise to improve my site-load speed. >> >> The two high priority ones to worry about are: >> - Leverage browser caching >> - Enable compression >> >> How do I deal with these internally to web2py and on heroku? >> >> (e.g.: Rocket doesn't support gzip; so how do I configure this on >> heroku? - All the guides I saw were for Django or Flaskā¦) >> >> FYI: I have also enabled these two lines in my db.py: >> response.optimize_css = 'concat,minify,inline' >> response.optimize_js = 'concat,minify,inline' >> >> How do I optimize these "High priority" metrics PageSpeed found? >> >> Thanks for all suggestions, >> >> Alec Taylor >> > -- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

