You can't really. One way to do something like this is to use JavaScript to set a hidden field on a login page or some such that pushes that ingo bhack to your CGI. the issue is that a user can change his window size anytime. Why not just write HTML that looks good no matter what size the window is?