Again...... it's not over and over.......... it happens the only first 
request that comes in pointing to anything http(ish). Second, third, etc 
will point to https already.

On Thursday, May 22, 2014 3:08:01 PM UTC+2, Richard wrote:
>
> Yeah you are right, I forget about relative URL, since I was trying to 
> create a link for an email sent by the app...
>
> Thanks for clarifying.
>
> 60 ms over and over could have been a great improvement overall if there 
> was no relative url though.
>
> :)
>
> Richard
>
>
> On Wed, May 21, 2014 at 4:35 PM, Niphlod <nip...@gmail.com 
> <javascript:>>wrote:
>
>> URL() generates relative links by default. No http or https.......plain 
>> /app/controller/function links.
>> that being said, URL has scheme and host parameters that can generate 
>> absolute links.
>>
>> Back to the "performance" side. Usually the "redirection" from http to 
>> https is required at the very first access to the website, and is handled 
>> directly by the webserver that is usually in front of web2py. 
>> It takes generally 40 to 60 ms. 
>> If your app uses relative links always, once you get to the https "main" 
>> page, all links will point to https, without you worrying to pass host and 
>> scheme all the time (that can surely hurt your "page weight" on average, in 
>> addition to your tipings skills.) 
>> Just to put things in perspective, this means that you're worrying over 
>> 60 ms in the whole user experience of your app (even in a supersimple 
>> website, users should stay there at least a minute in the app ?!?). 
>>
>> You'd better waste sleep hours on something else :-P 
>>
>> BTW: it's all here 
>> http://web2py.com/books/default/chapter/29/04/the-core#URL
>>
>>
>> On Wednesday, May 21, 2014 9:53:07 PM UTC+2, Richard wrote:
>>>
>>> Hello,
>>>
>>> I am searching a way to make URL() return an address with HTTP"S" 
>>> instead of plain HTTP. I didn't find a way to do that...
>>>
>>> There is :
>>>
>>> request.is_https
>>> request.requires_https()
>>>
>>> But they seem to be for preventing access to plain HTTP.
>>>
>>> So, that mean that URL() always redirect to HTTP and never to HTTPS... 
>>> That may reduce performance, I had read long time ago that reducing 
>>> redirection is "rule number 1" for improving loading speed...
>>>
>>> Maybe it could be a good idea to add a flag that let generate URL() with 
>>> HTTPS instead of only HTTP??
>>>
>>> Richard
>>>
>>>  -- 
>> 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 <javascript:>.
>> 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.

Reply via email to