Detect and track visitors screen resolutions

B

Brent

Does anyone know the best way to detect and track a visitors screen
resolution. I know the javascript to detect the users resolution but
I am a bit confused on the best way to track and save this. Should I
save it to a database or is it easier to save it to a text file?
 
R

Randy Webb

Brent said:
Does anyone know the best way to detect and track a visitors screen
resolution.

That depends on why you want to know.
I know the javascript to detect the users resolution but I am a bit
confused on the best way to track and save this.

That, again, depends on why you want to know. Screen resolution is just
about irrelevant on the web.

Should I save it to a database or is it easier to save it to a text file?

That depends on your server setup, what languages you have access to,
and what read/write priveleges you have.
 
K

kaeli

Does anyone know the best way to detect and track a visitors screen
resolution. I know the javascript to detect the users resolution but
I am a bit confused on the best way to track and save this. Should I
save it to a database or is it easier to save it to a text file?

Why?

Note that screen resolution doesn't necessarily mean anything.
My screen resolution is quite large so that I can multi-task. My browser
NEVER takes up the whole screen.
Then there's people who use TWO screens.
And webtv people.
And people who are visually impaired and use special browsers.
And people who use browsers that don't support script.
PDA users.
Phone users.
Etc.

Assuming there is actually some reason to make tracking the resolution
worthwhile, your best bet for saving the info depends on what server-
side scripting language you're planning on using. Javascript in the
normal, internet client-side environment has access to neither server-
side databases nor files. You'd have to detect the info with javascript,
then "call" a server-side script or CGI to save the data. There are many
ways to accomplish that.

--
 
B

Brent

Randy Webb said:
That depends on why you want to know.


That, again, depends on why you want to know. Screen resolution is just
about irrelevant on the web.



That depends on your server setup, what languages you have access to,
and what read/write priveleges you have.


The reaseon I want to know is so we can decide how to develope our new
site. I have all priveleges and have access to all languages.
 
K

kaeli

The reaseon I want to know is so we can decide how to develope our new
site. I have all priveleges and have access to all languages.

Any good developer develops for ALL resolutions. Especially since
resolution is completely meaningless in many situations. See my previous
post to this question.

See comp.infosystems.www.authoring.site-design and related groups for
how to properly design a website.

--
--
~kaeli~
"No matter what happens, somebody will find a way to take
it too seriously."
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
B

Brent

kaeli said:
Any good developer develops for ALL resolutions. Especially since
resolution is completely meaningless in many situations. See my previous
post to this question.

See comp.infosystems.www.authoring.site-design and related groups for
how to properly design a website.

--

Listen, I don't care about your opinion on screen resolutions. It is
none of your business why I want to track this. If you are not going
to help me with my problem then don't respond.
 
W

William Morris

Listen, I don't care about your opinion on screen resolutions. It is
none of your business why I want to track this. If you are not going
to help me with my problem then don't respond.

Then don't ask questions here. This forum isn't just to do your work for
you, it's also hopefully to teach you something.

Screen resolution on a public website is - listen carefully - meaningless.
A Waste Of The Programmer's Time. Writing to screen resolution is bad
programming.

As for tracking such information, there is no right way - it depends on your
skills and what your ISP will let you do. If you're on a Windows server
with an Access database and no FileScriptingObject, then save to database.
If you can use the FSO and don't want to use a database, then write a text
file. If it's a Linux/Unix box, then I've got no f'n clue what specifically
you have available, but the rules are the same.

And no whining.

- Wm
 
G

Grant Wagner

Brent said:
Listen, I don't care about your opinion on screen resolutions. It is
none of your business why I want to track this. If you are not going
to help me with my problem then don't respond.

On the client:

<script type="text/javascript">
(new Image()).src = 'http://server/cgi-bin/saveres.pl?width=' + screen.width + '&height=' + screen.height;
</script>

On the server (running Perl):

#!/usr/contrib/bin/perl

open (FILE, ">>saveres.txt");
print FILE $ENV{'QUERY_STRING'} . "\n";
close (FILE);

Knock yourself out.


For someone who has to depend on the kindness of strangers to accomplish your goals in life, you seem to be
lacking the necessary social grease with which to lubricate your interactions and achieve those goals.

--
| Grant Wagner <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
* http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html
* Internet Explorer DOM Reference available at:
* http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp
* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-developer/upgrade_2.html
 
T

Thomas 'PointedEars' Lahn

Brent said:
Does anyone know the best way to detect and track a visitors screen
resolution. I know the javascript to detect the users resolution
[...]


You do not because there is none that works as supposed. We had this
discussion recently and IMNSHO it answered all the questions regarding
the issue. It is not necessary to do the same discussions over and
over again, especially not every other week. Google is your friend.
[psf 6.1]


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top