[whatwg] How to improve the appearance of web pages

Ian Hickson ian at hixie.ch
Tue Feb 10 02:19:39 PST 2009


On Tue, 13 Mar 2007, Behnam ZWNJ Esfahbod wrote:
> 
> Implementing a new web application from scratch, I found out some new 
> ideas to make the appearance of site better.  I'm not sure here are the 
> best place for this discussion, but at least it's not out of interest.
> 
> First one is how Mozilla/Firefox do the zooming thing, "Text Size". On 
> web sites with images, changing the text size just works for +/- 2 
> levels.  More than that the whole page gets out of shape.  Seems Gecko 
> 1.9/Firefox 3 is going to resize images, but I'm not sure.
> 
> BTW the first trick is how to make images "zoomable", by the ratio of 
> "Text Size".  I set an style attribute for each image (which are not a 
> lot, limited to the logos) which sets "font-size" to image's width (in 
> pixel) and set the image's "width" to "1em".  It works well on Fx2.0 and 
> IE6.
> 
> The problem is there's no way to do it globaly, and I should add a 
> "style" attribute to each "img" tag.
> 
> Something I found weird is the default unit of images without width and 
> height attributes.  If there was a way to just set the default unit of 
> images to "em", the problem could be solved.

The problem is better solved using actual pixel zoom, rather than text 
zoom. Most browsers do this now.


> The second one is to get the web server decide which image file is 
> better.  An Apache httpd module can select the best response for a 
> request for image "the-company-logo" if it knows which size is needed, 
> and what mime-types are acceptable.
> 
> My idea is to add a field to the http request header for image files, to 
> let the server know which size the image is going to be shown, and then 
> it decides to send the best answer. [...]
> 
> Another usage is when the browser does the zooming.  When I zoom in the 
> page 200%, that's good if browser can get the company logo with better 
> quality.  It would be just another request for "the-company-logo" with 
> the 384 pixels width, and it may be a bitmap or vector file again. [...]

I recommend bringing this up with the HTTP working group, as it seems out 
of scope for HTML5.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list