Results 1 to 4 of 4

Thread: resolution detection with notification pop-up?

  1. #1
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default resolution detection with notification pop-up?

    I have 15% of my visitors using 800x600 resolution, which makes my forum home look cramped and horrible. Can someone please explain how I can setup a script that automatically detects a visitor using this exact resolution (or perhaps any below 1024x768) and popup a window warning, or static warning on the actual page (maybe header?)...with a custom message suggesting they increase their resolution?

    Even browser / version detection also would be great too, along with javascript being disabled.

    I would appreciate some insight on this. Thanks.
    Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible ]
    .....................................................................................
    LogicWeb [ Awesome Web Hosting Since 2004 ]

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Browser and resolution sniffing in a situation like this is rather pointless. Once you alert the user that they should use a higher res or another browser, what can the average user do about it?

    Most people are already at their maximum resolution. And most people aren't going to install a browser just to view your site.

    As long as the content is viewable and accessible at 800 x 600, there is nothing much to worry about. Folks who are limited to that resolution have become accustomed to things occasionally looking a bit cramped.

    This is not to say that a site cannot be designed to work well in various resolutions.

    You should be aware that lower resolution monitors make everything look bigger. If your font sizes are set as percents, the user can adjust their text size down, and if your layout is otherwise fluid enough, this will alleviate any cramped look to the page(s). In fact, the default text size for most users with 800 x 600 is smaller than that used by 1024 x 768 and above users.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    And most people aren't going to install a browser just to view your site.
    Quite the contrary. I have already posted a "Chad's Tip" thread in my forum which helped enormous amount of my non-technical members, even some technical that heeded my advice.

    As for 800x600 being max resolution, I could be wrong here but that's almost unheard of this day and age unless your monitor is literally about 20 years old. I've been using computers since the 80's and I remember even the early 90's resolution max was pretty much about 1024x768.

    Check it out:
    http://www.talkjesus.com/technical-s...tion-tips.html
    Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible ]
    .....................................................................................
    LogicWeb [ Awesome Web Hosting Since 2004 ]

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I disagree with your assessment, but it isn't a big deal with me. Screen resolution is easy to detect, browsers are a bit trickier.

    Virtually all browsers will correctly report these two properties:

    screen.width

    and:

    screen.height

    and report them quite literally, so if screen.width is less than or equal to 800:

    Code:
    if(screen.width<=800)
    alert('Use a higher resolution');
    or some such thing. Any resolution can be detected and acted upon in this sort of fashion.

    When it comes to browsers, they can spoof as other browsers, but a clever script can cut through that (subject to future changes in browser's spoofing abilities, and future changes in the default self reporting of browsers). However, depending upon why you want to know, it is generally better to test if a method or object is available before using it, and then to branch your code accordingly. After all, who cares what the browser is, as long as it can handle the code?

    But, if browser type/version sniff you must, this is a good resource:

    http://www.howtocreate.co.uk/tutoria...s/sniffer.html

    as is:

    http://www.quirksmode.org/js/detect.html

    Less useful in detecting, but perhaps interesting nonetheless is this page I created:

    http://home.comcast.net/~jscheuer1/side/nav_obj/

    which iterates the navigator object for virtually any browser. It doesn't detect anything, but it does report what any given browser has set as properties of the navigator object, and what those values are.

    I do still stand by my premise though, which (to elaborate) is that you can design a page that will look good (not identically) in about any resolution, and that will function well (not identically) in about any browser with, or without javascript enabled. And that doing so is more professional looking, and perhaps even easier in the long run than trying to make your users change their hardware and/or software settings or equipment, or than is setting up several different versions of your site.

    There is more to this issue. For example - the positive responses from folks you have educated. You are not going to hear much from people who found that effort obnoxious, they will just surf elsewhere. And - detecting things with javascript is limited, it excludes folks without javascript enabled. The list goes on and on.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •