Posted on Sat - November 12, 2005

Redirect/Frame Page


Here is an example of my Redirect/Frame Pages. Obviously I want folks to be redirected, but just in case they aren't, the page creates a frame to host the real site. That way I don't have to use multiple hosts for each site. Down at the bottom of the entry you'll find the complete code, but I will walk through this step by step.

We start with the HTML and HEAD tags obviously.

Gotta have a title. In this case it is also a visual cue. If browser window is titled this, then JavaScript isn't working and the frame window loads.
<TITLE> The NeoWayland NetWork presents www.paganvigil.com </TITLE>


The meta tags just tell what is here so the search engines can find the page easier. Ideally these match the tags from the original page.
<META NAME="description" CONTENT="A libertarian perspective by NeoWayland. Pagan philosopher, libertarian, & part-time trouble maker, NeoWayland watches for threats to individual freedom or personal responsiblity. There's more to life than black & white, using only extremes just increases the problems."/>
<META NAME="keywords" CONTENT="libertarian, kyfho, tanstaafl, liberty, politics, morality, free market, perspective, Pagan philosopher, NeoWayland"/>


The JavaScript is the key, it redirects the user to the web addy I that I choose. This only works if the user has JavaScript enabled.
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from old browsers
window.location="http://www.paganvigil.com"
// End hiding script from old browsers -->
</SCRIPT>


The JavaScript stays in the HEAD, so next we put in the closing tag. Now the rest is pure HTML. If JavaScript works, you only see it for a few seconds for the page to redirect. Otherwise, the frame kicks in. The disadvantage of frames like this is that the user doesn't know the actual address they are viewing and that movement in the frame doesn't show. I take care of part of that problem by putting my preferred web addy in the window title.
<FRAMESET border=0 rows="100%,*" frameborder="no" marginleft=0 margintop=0 marginright=0 marginbottom=0>
<frame src="http://www.paganvigil.com" scrolling=auto frameborder="no" border=0 noresize>
<frame topmargin="0" marginwidth=0 scrolling=no marginheight=0 frameborder="no" border=0 noresize>
</FRAMESET>


Finally I throw in a bit just in case they don't have EITHER JavaScript or frames working.
<NOFRAMES><BODY><P>
<BLOCKQUOTE>Pagan Vigil ... "more than just black or white"</BLOCKQUOTE><P>
Click here to go to www.paganvigil.com</BODY></NOFRAMES>

And here is the complete code in one continuous block.

<TITLE>The NeoWayland NetWork presents www.paganvigil.com</TITLE>
<META NAME="description" CONTENT="A libertarian perspective by NeoWayland. Pagan philosopher, libertarian, & part-time trouble maker, NeoWayland watches for threats to individual freedom or personal responsiblity. There's more to life than black & white, using only extremes just increases the problems."/>
<META NAME="keywords" CONTENT="libertarian, kyfho, tanstaafl, liberty, politics, morality, free market, perspective, Pagan philosopher, NeoWayland"/>
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from old browsers
window.location="http://www.paganvigil.com"
// End hiding script from old browsers -->
</SCRIPT>
</HEAD>
<FRAMESET border=0 rows="100%,*" frameborder="no" marginleft=0 margintop=0 marginright=0 marginbottom=0>
<frame src="http://www.paganvigil.com" scrolling=auto frameborder="no" border=0 noresize>
<frame topmargin="0" marginwidth=0 scrolling=no marginheight=0 frameborder="no" border=0 noresize>
</FRAMESET>
<NOFRAMES><BODY><P>
<BLOCKQUOTE>Pagan Vigil ... "more than just black or white"</BLOCKQUOTE><P>
Click here to go to www.paganvigil.com</BODY></NOFRAMES>
</HTML>

www.teknopagan.com
       



teknologi
© 2005 - 2008 All Rights Reserved