W3C home > Mailing lists > Public > public-html@w3.org > April 2014

Algorithm for optimal window-size on responsible websites

From: Gerrit Addiks <gerrit@addiks.de>
Date: Tue, 22 Apr 2014 20:36:09 +0200
Message-ID: <5356B699.2070302@addiks.de>
To: public-html@w3.org
Hello public-html,

I think that all applications should display it's content as
economical/efficient as possible and don't waste space on my displays. I
don't know if this has been developed like this on purpose or not but in
my point of view most current browsers are really NOT economical or
efficient when it comes to use display-space without much waste or
user-interaction. That is because all browsers i know have a fixed
window-size regardless of the displayed content. To change this (at
least for me), i have developed a Firefox-extension (*) which resizes
the browser-window on every page-load so that it fits the content as
best as possible. It determines the best size using the following three
 1) Always obey to configured minimum and maximum sizes.
 2) The canvas should be big enough to not need scrollbars as long as
rule 1 is not broken.
 3) The canvas should be as small as possible.

Although this set of rules works good on most sites, it sometimes
produces unwanted side-effects on sites that are designed to follow the
'responsible website' paradigm. The site on the desktop switches into a
mobile view and gets really small and inconvenient to use. Now i am
searching for solutions on how to fix that (how to find the optimal size
for responsible websites on a desktop) and i think that i can only get
so far without additional information provided by the site because i
cannot know if this small size is intended like on a small login-page
(**) or if it is accidental behavior (***). Here are some possible
solutions i have found so far:

 a) Let the developer specify the optimal size it should have on a desktop.
This is a bad idea in my opinion because in the past there were often
enough examples of developers resizing the window in ways that were
against the user.
As stated above, i think it is the responsibility of the application to
display the content the best way and not the other way around.

 b) Having the site tell the browser the 'mode' it currently is in.
This means that as soon as the canvas gets resized too small, some
indicator switches from 'desktop' to 'mobile' and tells the
desktop-browser that the canvas is now too small.
Although it would be harder to screw up, this approach suffers from the
same problems as solution 'a'. As long as the control is at the
site-owner, someone will screw up.

 c) Let the site provide different setup's from which the browser
chooses which to use.
This means that the site (the requested HTML-document) can optionally
provide a set of defined setups from which the browser chooses the one
it thinks it fits best for it's purposes. Once chosen, it will not
change the setup in the future (per session?). The logic that chooses
the setup is hard-coded into the browser and does not rely on dynamic
variables like window-size or font-size but only on static constants
that will not change like resolution and DPI. One possible concrete
solution could be conditional css-includes depending on what setup was
As far as i can see this would solve all the problems but it may also be
a relative expensive solution.

 d) A switch for the site developer that indicates that this site is
responsible and no auto-adjustment should be done.
The browser would look for a special flag on the website and if it finds
it means that the site developer thinks that any auto-resize would not
have a positive effect for the user. The browser would switch back to a
default canvas-width that is common today and prescribed by the browser.
This is more a workaround for responsible websites where it is
impossible to find a perfect size using an algorithm.
In the end it is just a non-optimal trade-off: The site-developer buys
more usability for less economic browser-behavior.
The user might be able to configure the browser to ignore the switch,
but it still is a trade-off without much gain.

You may have already guessed it, i am really no friend of responsible
design the way it currently gets implemented. To me it always felt like
a dirty workaround for the browsers missing ability to display the
content in an optimal way, so site-dev's do it them selfs even if it
should not be their responsibility (IMHO). I think the web (HTML) lacks
a way to deal with content-responsibility in a way that the user and/or
the browser are in control (whatever they choose to do with that control).

I know that many people don't like the idea of automatically resizing
browser-windows because they had bad experience with uninformed
site-developers resizing the window against the users will. Whatever the
solution is, it should be optional. The browser-vendor and the user
should always be free to reject it. It does not have to be
implemented/used by everyone, for me it would be enough if there were
something in HTML that would help my extension to find the best size
even on responsible websites. Please don't get me wrong here, i don't
want automatic-resize to be a default behavior, but it would be nice if
HTML would provide a way for these that explicit want the browser-window
to fit the content. I am using the extension for some month (half a year
or so) and really like the automatic resize better then the browsers
default behavior even if it is not perfect yet i think this really could
be useful for some people on the web.

Please tell me what you think and if you could think of another possible
solution or any other feedback. My goal is a healthy discussion and as a
result maybe a proposal for W3C and the browser-vendors on how to change
or add to HTML (or another solution that works without any changes or
additions to HTML) to make the web a better place. Maybe someone has a
better approach for an algorithm to find the best canvas-size even on
responsible sites, but i don't see how that would be possible without
additional information. Please also tell me if i did something wrong as
this is the first time writing to the public-html mailing list.

Thank you for reading this,
Gerrit Addiks <gerrit@addiks.de>

(*)   =
(**)  =
(***) = http://www.addiks.de/wp-content/jquery.screenshot.png
Received on Friday, 25 April 2014 13:28:26 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:08 UTC