The problem who is web2py supposed to know which spaces to keep and
which to remove? To do it, it would need to "understand" the html by
parsing and then re-writing it. First of all it is slow. Second, it
can break the css since whitespaces affect css behavior.



On Dec 14, 10:39 pm, Alex Fanjul <alex.fan...@gmail.com> wrote:
> But... what about pages size?
> Doing some very basic test with Denes Example show us that including
> blank lines increase the output page size by *x2 factor* at least (ie.
> 67KB vs 130KB).
> Maybe I'm wrong, but, forgetting server deflating (which not everybody
> use), there are a double size in store and transmit bandwidth, that is
> money.
>
> If it isn't too dificult to implement I would prefer to see it legible
> in 'design' and 'running' time, because many times people review and
> debug webpages over generated code (I guess)
>
> Regards,
> Alex F
>
> El 15/12/2009 5:12, DenesL escribi�:
>
>
>
> > It all comes down to a trade off.
> > Do you want you view or your final output to be legible and
> > aesthetically pleasing according to some subjective human standard?.
>
> > Don't get me wrong, I dislike the empty lines as much as you do but as
> > Massimo said the view only outputs what it has:
>
> > this view
> > <ul>{{for x in range(1,r+1):}}<li>{{if x==c:}}<b>{{=x}}</b>{{else:}}
> > {{=x}}</li>{{pass}}{{pass}}</ul>
>
> > could produce this
> > <ul><li>1</li><li>2</li><li><b>3</b></li><li>4</li><li>5</li></ul>
>
> > but a more legible
> > <ul>
> > {{for x in range(1,r+1):}}<li>
> >    {{if x==c:}}<b>{{=x}}</b>
> >    {{else:}}{{=x}}
> >    </li>
> >    {{pass}}
> > {{pass}}
> > </ul>
>
> > will give you this
> > <ul>
> > <li>
> >    1
> >    </li>
>
> > <li>
> >    2
> >    </li>
>
> > <li>
> >    <b>3</b>
>
> > </li><li>
> >    4
> >    </li>
>
> > <li>
>
> >    5
> >    </li>
>
> > </ul>
>
> > and both outputs would look exactly the same in a browser.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.
>
> --
> Alejandro Fanjul Fdez.
> alex.fan...@gmail.comwww.mhproject.org
>
>  li_denes.html
> 90KViewDownload
>
>  li_denes_wspaces.html
> 176KViewDownload

--

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


Reply via email to