Page-Details : Screen Resolution Detect/Redirect
General
This very simple script detects the screen resolution of the user, and redirects them to the appropriate URL. It only needs to detect the screen width, making it compact and quick.
Notes
- Created by: RoBorg
- Web Site: http://javascript.geniusbug.com
- Posted: September 21, 2007
Source Code
Paste this source code into the designated areas.
External file
Paste this code into an external JavaScript file named: screenRes.js
Head
Paste this code into the HEAD section of your HTML document.


Leave a Response
(3 comments)Not sure what the problem is, David. It works fine for me. Might be a delay in your IP sending the e-mail.
The script is not forwarding to the address as promised!
The problem here is that screen resolution is irrellevant. What matters are the dimensions of the browser itself. As screens get larger and larger, fewer and fewer people surf with their browser windows maximized.[br /]My screens are set to 1600x1200, but my browser is sized closer to 1280x1040. Therefore, if I visit a site that uses this sort of script to redirect me to a page designed for 1600x1200, it won't work.[br /][br /]The point is, ignore screen resolution and query the dimensions of the browser- or just use a liquid design that will flow properly regardless of screen size.