[thelist] What screen size are my visitors using

David Dorward evolt at david.us-lot.org
Wed May 26 05:15:04 CDT 2004


On 26 May 2004, at 10:49, john at johnallsopp.co.uk wrote:
> I have a site which I'm upgrading and wonder what the most popular 
> screen
> resolution (eg. 800 x 600) of users is.
>
> I can see that JavaScript can get at that data and pass it to PHP 
> through
> HTTP GET, but that seems to require people to click a form, and there 
> are
> no forms on the site.

Use JavaScript to document.write (assuming you are using HTML 4.01, 
document.write and XHTML don't play nicely together) or add using DOM 
an <img> with the data in the query string for the URI you put in the 
src attribute. Remember that resolution and window size are different 
things, my desktop at home is 3000px wide, but my browser is usually 
somewhere between 700px and 1100px wide.

Gratuitous example: 
http://images.dorward.me.uk/Screenshots/new-monitor.jpeg

I generally prefer to simply not care what resolution people use, and 
design my pages to fit in as narrow a window as is sane (where sanity 
varies with content - its wider for photos or code examples then 
prose).

--
David Dorward
      <http://dorward.me.uk/>
<http://blog.dorward.me.uk/>



More information about the thelist mailing list