Hello
Does anyone know how to get the screen height in a Perl CGI script? I know that Perl is a server-side language but is there any way to get the screen height (pixels) of the users screen?
Thanks
Hello
Does anyone know how to get the screen height in a Perl CGI script? I know that Perl is a server-side language but is there any way to get the screen height (pixels) of the users screen?
Thanks
Do you mean getting the height of the user's browser window?
There's no way to get that information without using some Javascript.
I would use Javascript/CSS to control presentation (like width and height), not the backend language.
well, you can use js to set a cookie of the height then in next request, use Perl CGI to get the cookie.
do remember, you will not get the height in the first visit.
Thanks.
I would recommend reading up this Howtocreate article
There are different interpretations of a window height/width, and you should know these quirks.
Sure , make an ajax request with either XMLHttpRequest or jQuery (or whatever other framework you prefer) and send window.innerHeight to your server