|

PPC>
Web
building> Scripts
Optimise Window size
How many times have you surfed to a site that
looks awful in the size of browser you use? Your site might look the
same to other surfers – but here’s a snippet of JavaScript that will
allow them to size their browser window perfectly for your site.
You, as a Webmaster, can control many aspects of
your visitor’s experience, and while you should exert as little
control as possible, sometimes the layout of your site requires a
specific size of browser window to look its best. But first, a
little background.
Statistics
Firstly, there are more surfers using 800x600 screen
resolution than any other:
|
800x600 |
(51%) |
|
1024x768 |
(35%) |
|
640x480 |
(4%) |
|
1280x1024 |
(4%) |
|
1152x864 |
(3%) |
|
Unknown |
(1%) |
As you can see, 640x480 accounts for only 4% of
users, while a resolution suitable for 800x600 (or slightly smaller)
would be fine for everybody else. That doesn’t mean, though, that
you have to max out at 800 pixels width. Sometimes, it’s better to
be at, say 620 pixels wide and slightly higher than you might
otherwise, in order for the layout to look right. And that’s exactly
where this little bit of scripting comes in.
There are two ways to implement it. The first is to
force the browser window to your preferred size – the surfer has
no control – and the second is to include a link that allows them to
“optimise” their window size for your site, which gives them
control.
Click here to
get the code snippets for both methods.
^top
|