Javascripts > Javascript Redirects > Screensize Redirect
Script Title: Screensize Redirect
Description: Redirect your visitors based on their screen resolution.
Example: No example available for this script.
Copy the following code into your <HEAD></HEAD> tags.<script language="javascript"> //Ali Almossawi's CyberiaPC.com //www.cyberiapc.com var s1024x768page = "htmlmain1024.htm"; var s800x600page="htmlmain800.htm"; var s640x480page="htmlmain640.htm"; var pagetype; if ((screen.height == 768) && (screen.width == 1024)) { pagetype = 1; } else if ((screen.height == 600) && (screen.width ==800)) { pagetype = 2; } else if ((screen.height == 480) && (screen.width ==640)) { pagetype = 3; } else { pagetype = 1; } if (pagetype ==1) {window.location.href =s1024x768page } else if (pagetype ==2) { window.location.href = s800x600page } else if (pagetype ==3) { window.location.href = s640x480page } //-> </script>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email