[Xitami] Screen Resolution...

Thomas J. Hruska xitami@lists.xitami.org
Thu, 28 Jun 2001 23:47:11 -0500


As I was playing around with IE, I noticed that the headers contain some
extremely useful data that my CGI-based applications could use.  I have
this interesting idea that Xitami could do something horribly non-standard
and pass all of the headers onto my CGI (filter) through another
environment variable.  Here is what I propose:

1)  Create a configuration file option to turn on/off the COMPLETE_HEADERS
environment variable.
2)  During runtime, if the environment variable option is on, then the
COMPLETE_HEADERS variable is created.  Xitami stores the headers into the
environment variable as a zero-terminated URL encoded string.

Of particular interest to me (and probably a few others) are the headers:

UA-pixels: 1152x864
UA-color: color16
UA-OS: Windows NT
UA-CPU: x86

Now, I could use JavaScript to do what I want on the client end of things,
but it would be nice to just grab and parse the headers for the information
I need rather than play with cookies (we all know how much we love cookies
:)) or other similar mechanism (cookies are easier).  The only problem with
both methods is that the user might turn the headers off.  It doesn't
matter, except that the server-side method is a lot easier to code than the
cookie or JavaScript methods.

Just an idea...


           Thomas J. Hruska -- shinelight@crosswinds.net
Shining Light Productions -- "Meeting the needs of fellow programmers"
                  http://www.shininglightpro.com/