Page-Details : Screen Resolution Detect/Redirect | JavaScriptSource

Page-Details : Screen Resolution Detect/Redirect

JavaScriptSource Staff Sep 21, 2007

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

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.

Lee Oct 5, 2007

The script is not forwarding to the address as promised!

David Oct 4, 2007

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.

Tweak Sep 21, 2007