Re: [web2py] Re: Optimising caching and enabling gzip for web2py on heroku?

2016-03-13 Thread Niphlod
if you're running web2py under iis (and not just using iis as a reverse 
proxy to the rocket webserver) you need to write a rewrite rule to serve 
gzipped files.
if static files are handled by web2py it takes care automatically to serve 
the .gz file instead of the "raw" one if it's existing

the resulting conf would look like










On Friday, March 11, 2016 at 3:37:09 PM UTC+1, Yebach wrote:
>
> So i gzipped my files. I am running my web2py on windows not on apache or 
> anything. Is is possible to serve them like that or do I have to use Apache 
> server for this to work?
>
> 2016-03-11 15:18 GMT+01:00 Kiran Subbaraman  >:
>
>>
>> http://web2py.com/books/default/chapter/29/13/deployment-recipes#Compress-static-files
>>
>> 
>> Kiran Subbaramanhttp://subbaraman.wordpress.com/about/
>>
>> On Fri, 11-03-2016 7:22 PM, Yebach wrote:
>>
>> I would like to speed up my page a little bit. one of the suggestions by 
>> https://gtmetrix.com is to gzip my files 
>>
>> I am looking at your zip_statis_file.py where do I insert this function?
>>
>> On Sunday, March 3, 2013 at 2:55:02 PM UTC+1, Niphlod wrote: 
>>>
>>> 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 
>
 -- 
>> 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+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
>> 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/1CcxCblrW6o/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Lep pozdrav 
>
> Vid Ogris
>
>
>

-- 
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.


Re: [web2py] Re: Optimising caching and enabling gzip for web2py on heroku?

2016-03-12 Thread Kiran Subbaraman
Sure, you can use web2py on windows (with its bundled Rocket webserver) 
to serve your pages. But then Rocket webserver has limited configuration 
options, as listed on this page: 
http://web2py.com/books/default/chapter/29/13/deployment-recipes#Deployment-recipes--Infrastructure
A suggestion is to put a webserver in front of your web2py instance 
which can handle the serving of static files, without having to get 
web2py to do this (these are the things that you gzipped anyway).
I suggest you look at the "Deployment Recipes" section for more idea to 
"speed" up your deployment: 
http://web2py.com/books/default/chapter/29/13/deployment-recipes



Kiran Subbaraman
http://subbaraman.wordpress.com/about/

On Fri, 11-03-2016 8:07 PM, Vid Ogris wrote:
So i gzipped my files. I am running my web2py on windows not on apache 
or anything. Is is possible to serve them like that or do I have to 
use Apache server for this to work?


2016-03-11 15:18 GMT+01:00 Kiran Subbaraman 
>:



http://web2py.com/books/default/chapter/29/13/deployment-recipes#Compress-static-files


Kiran Subbaraman
http://subbaraman.wordpress.com/about/

On Fri, 11-03-2016 7:22 PM, Yebach wrote:

I would like to speed up my page a little bit. one of the
suggestions by https://gtmetrix.com is to gzip my files

I am looking at your zip_statis_file.py where do I insert this
function?

On Sunday, March 3, 2013 at 2:55:02 PM UTC+1, Niphlod wrote:

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

-- 
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.


-- 
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 a topic in
the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/web2py/1CcxCblrW6o/unsubscribe.
To unsubscribe from this group and all its topics, send an email
to web2py+unsubscr...@googlegroups.com
.
For more options, 

Re: [web2py] Re: Optimising caching and enabling gzip for web2py on heroku?

2016-03-11 Thread Vid Ogris
So i gzipped my files. I am running my web2py on windows not on apache or
anything. Is is possible to serve them like that or do I have to use Apache
server for this to work?

2016-03-11 15:18 GMT+01:00 Kiran Subbaraman :

>
> http://web2py.com/books/default/chapter/29/13/deployment-recipes#Compress-static-files
>
> 
> Kiran Subbaramanhttp://subbaraman.wordpress.com/about/
>
> On Fri, 11-03-2016 7:22 PM, Yebach wrote:
>
> I would like to speed up my page a little bit. one of the suggestions by
> https://gtmetrix.com is to gzip my files
>
> I am looking at your zip_statis_file.py where do I insert this function?
>
> On Sunday, March 3, 2013 at 2:55:02 PM UTC+1, Niphlod wrote:
>>
>> 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

>>> --
> 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.
>
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/1CcxCblrW6o/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Lep pozdrav

Vid Ogris

-- 
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.


Re: [web2py] Re: Optimising caching and enabling gzip for web2py on heroku?

2016-03-11 Thread Kiran Subbaraman

http://web2py.com/books/default/chapter/29/13/deployment-recipes#Compress-static-files


Kiran Subbaraman
http://subbaraman.wordpress.com/about/

On Fri, 11-03-2016 7:22 PM, Yebach wrote:
I would like to speed up my page a little bit. one of the suggestions 
by https://gtmetrix.com is to gzip my files


I am looking at your zip_statis_file.py where do I insert this function?

On Sunday, March 3, 2013 at 2:55:02 PM UTC+1, Niphlod wrote:

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

--
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.


--
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.