Automatic adjustment for display variations?

by DavidO
4 replies
  • WEB DESIGN
  • |
Is there a script or code that can detect a user's display settings and load different versions of a website for those settings?

That would solve a lot of compatibility problems. For example, less than 10% of my visitors use 800 X 600 display so I design for 1024 X 768. But I still hate to make my site difficult for even a small number of visitors.

With a function as I described above you could have 2 or 3 different site versions for different displays. I know you can design with percentages but that has its own set of problems. My idea would be ideal.
#adjustment #automatic #display #variations
  • Profile picture of the author Adi E
    Use percentages instead of fixed widths in your CSS
    {{ DiscussionBoard.errors[920182].message }}
  • Profile picture of the author DavidO
    Thanks, Adi. That's the usual way of doing it but, like I said, this brings up a lot of problems of its own, mostly due to images because their size is static.
    {{ DiscussionBoard.errors[920219].message }}
    • Profile picture of the author LaCosaNostra
      Avoid the usage of large dimension of images as possible as you can. Large images would also increased download time of the pages, and it would be frustrating especially for those who have limited speed internet connection. Be wise to layout your pages, thus the overall look still beautiful without those large images
      {{ DiscussionBoard.errors[920424].message }}
  • Profile picture of the author mywebwork
    This brings back memories (not particularly pleasant ones!) of designing a site in 1999 and having to detect what type of browser the user had so they could be sent to a correctly formatted site. Ended up building 4 sites in one - for two versions of IE and two versions of Netscape.

    You can use JavaScript to detect your users screen size, an example is here:

    Detecting user's screen size

    This (horribly formatted) page has links to several code samples, you could probably modify one to suit your needs:

    Javascript Browser Detection Tutorials: Browser-Based Objects: Detecting Visitor's Browsers, Alerting Users, Redirecting Redirection based on user

    And here is a good example that couples JavaScript with PHP:

    How To Get Screen Resolution Show Screen Size Script With Php Javascript Sample Demo

    The only issue I can see is that there are so many screen sizes these days it will be hard to know where to stop!

    Best of luck, hope this helps.

    Bill
    {{ DiscussionBoard.errors[923170].message }}

Trending Topics