Web Design

Only members of this group can post notes and use other group resources. Join now to get access to all group resources!
Log in or register to join this group

Client Side Scripting URL Masking - Screen Size Redirect   Viewed 17078 time(s), 2 post(s)., 8/11/2013 4:38:47 PM - by chris

chris
chris 8/12/2013 3:23:30 PM

I am not a wizard on HTML. I have a Index.html which contains the code below. As you will see it will redirect you to a page based on your screen size. However when it redirects you , you see the page name i.e Index1024.html

Is there anyway to mask the URL so that you only see Index.html?

Thanks in advance

<SCRIPT language="JavaScript">
<!--
if ((screen.width>=1280) && (screen.height>=1024))
{
window.location="Index1280.html";
}
else if((screen.width>=1024) && (screen.height>=768))
 
window.location="Index1024.html";
{
 
}
//-->
</SCRIPT>

This content has not been rated yet. 
112 Reputation 6 Total posts
1
Sam
Sam 8/12/2013 3:47:16 PM

try

<SCRIPT language="JavaScript">
<!--
if ((screen.width>=1280) && (screen.height>=1024))
{
  location.replace("Index1280.html");
}
else if((screen.width>=1024) && (screen.height>=768))
  location.replace("Index1024.html");
{
 
}
//-->
</SCRIPT>

This content has not been rated yet. 
233 Reputation 37 Total posts
2