Detect and track visitors screen resolutions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brent

    Detect and track visitors screen resolutions

    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?
  • Randy Webb

    #2
    Re: Detect and track visitors screen resolutions

    Brent wrote:
    [color=blue]
    > Does anyone know the best way to detect and track a visitors screen
    > resolution.[/color]

    That depends on why you want to know.
    [color=blue]
    > I know the javascript to detect the users resolution but I am a bit
    > confused on the best way to track and save this.[/color]

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

    [color=blue]
    > Should I save it to a database or is it easier to save it to a text file?[/color]

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


    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javas cript FAQ - http://jibbering.com/faq/

    Comment

    • kaeli

      #3
      Re: Detect and track visitors screen resolutions

      In article <ad38a8cd.04042 70835.f08cac0@p osting.google.c om>,
      brnetg@yahoo.co m enlightened us with...[color=blue]
      > 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?
      >[/color]

      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.

      --
      --
      ~kaeli~
      Is it possible to be totally partial?



      Comment

      • Brent

        #4
        Re: Detect and track visitors screen resolutions

        Randy Webb <hikksnotathome @aol.com> wrote in message news:<kZWdneUjJ 5aFExPd4p2dnA@c omcast.com>...[color=blue]
        > Brent wrote:
        >[color=green]
        > > Does anyone know the best way to detect and track a visitors screen
        > > resolution.[/color]
        >
        > That depends on why you want to know.
        >[color=green]
        > > I know the javascript to detect the users resolution but I am a bit
        > > confused on the best way to track and save this.[/color]
        >
        > That, again, depends on why you want to know. Screen resolution is just
        > about irrelevant on the web.
        >
        >[color=green]
        > > Should I save it to a database or is it easier to save it to a text file?[/color]
        >
        > That depends on your server setup, what languages you have access to,
        > and what read/write priveleges you have.[/color]


        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.

        Comment

        • kaeli

          #5
          Re: Detect and track visitors screen resolutions

          In article <ad38a8cd.04042 80721.2a8f76a1@ posting.google. com>,
          brnetg@yahoo.co m enlightened us with...[color=blue]
          >
          >
          > 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.
          >[/color]

          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.infosystem s.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."



          Comment

          • Brent

            #6
            Re: Detect and track visitors screen resolutions

            kaeli <tiny_one@NOSPA M.comcast.net> wrote in message news:<MPG.1af9a 4ef69453748989d d7@nntp.lucent. com>...[color=blue]
            > In article <ad38a8cd.04042 80721.2a8f76a1@ posting.google. com>,
            > brnetg@yahoo.co m enlightened us with...[color=green]
            > >
            > >
            > > 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.
            > >[/color]
            >
            > 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.infosystem s.www.authoring.site-design and related groups for
            > how to properly design a website.
            >
            > --[/color]

            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.

            Comment

            • William Morris

              #7
              Re: Detect and track visitors screen resolutions

              > Listen, I don't care about your opinion on screen resolutions. It is[color=blue]
              > 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.[/color]

              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 FileScriptingOb ject, 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


              --
              William Morris
              Product Development, Seritas LLC
              Kansas City, Missouri


              Comment

              • Grant Wagner

                #8
                Re: Detect and track visitors screen resolutions

                Brent wrote:
                [color=blue]
                > kaeli <tiny_one@NOSPA M.comcast.net> wrote in message news:<MPG.1af9a 4ef69453748989d d7@nntp.lucent. com>...[color=green]
                > > In article <ad38a8cd.04042 80721.2a8f76a1@ posting.google. com>,
                > > brnetg@yahoo.co m enlightened us with...[color=darkred]
                > > >
                > > >
                > > > 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.
                > > >[/color]
                > >
                > > 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.infosystem s.www.authoring.site-design and related groups for
                > > how to properly design a website.[/color]
                >
                > 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.[/color]

                On the client:

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

                On the server (running Perl):

                #!/usr/contrib/bin/perl

                open (FILE, ">>saveres.txt" );
                print FILE $ENV{'QUERY_STR ING'} . "\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 <gwagner@agrico reunited.com>

                * Client-side Javascript and Netscape 4 DOM Reference available at:
                * http://devedge.netscape.com/library/...ce/frames.html
                * Internet Explorer DOM Reference available at:
                * http://msdn.microsoft.com/workshop/a...ence_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-deve...upgrade_2.html


                Comment

                • Thomas 'PointedEars' Lahn

                  #9
                  Re: Detect and track visitors screen resolutions

                  Brent wrote:
                  [color=blue]
                  > Does anyone know the best way to detect and track a visitors screen
                  > resolution. I know the javascript to detect the users resolution
                  > [...][/color]


                  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

                  Comment

                  Working...