thanks chris,
I'll detect if a browser supports getElementById and serve my rich format page. If the browser doesn't support getElementById, I'll serve the default page.
I have to use two versions of each page, you'll see as I explain.
The script is something like this:
<script>
<!--
if ((document.layers) || (document.all)) //detects NN4 & IE4
serve up the default page
else
if (getElementById)
serve up my rich format page;
//-->
</script>
*There's a couple others I'll have to detect also.
The code under the "if" is more complex in my script. I'm detecting screen size and loading one of three separate style sheets for three separate screen sizes.
"if(getElementById)" will return TRUE if the browser supports it. If it doesn't support it, then the script will serve the default page.
My problem is that I'm using tables and want to support old browsers beginning with NN4 and IE4. I'm formatting with CSS. NN4 doesn't recognize CSS "width" for tables. If you use " width: 22px;" NN4 doesn't recognize it and your tables are screwed up if you try to use CSS to set the width.
I'm not supporting anything older than NN4 or IE4. Those people are going to have to upgrade and I'll inform them of this. Right now, I'm getting 10 or 12 hits a week from NN4, so I have to support it or risk losing out because of a broken display.
My default pages will support the old browsers so I have to use straight html <td width="22"> to size my tables.
I can't reformat the width using CSS if I have already set the width with width="22". At least, I don't know of a way.
So, I need a duplicate of all my default pages with the widths and everything else formatted with CSS. I'd store the new set in a subdirectory and redirect to that subdirectory for the newer browsers.
What I don't know is how to redirect the browser to the pages with rich text format in the subdirectory. Once the visitor is in the subdirectory, that's where he'll stay until he leaves because there will be no links out to the top level. The entire site wiil be duplicated in the subdirectory.
I'm not sure if this is considered as cloaking. Is this cloaking? I won't do anything that's against anybody's TOS so whatever route I take has to 100% legitimate.
Is there such a thing as legitimate cloaking? I've heard that other sites use cloaking to serve different browsers.
I won't have to redirect for the default pages which will be on the root of the site's top-level directory.
The current plan is to store the pages for old browsers on the root and store pages for the newer browsers in a subdirectory and redirect to the new browser directory as needed.
This will also cover if the visitor has his JavaScript turned off. He will automatically get the default old browser pages which will pisplay on his screen with no problem.
Moreover, the pages in the default directory can be written with little or no script because I've already screened for browsers and every browser I send to that directory will support my formatting.
I know how to do a 301 redirect. I'm using one now on a page that I changed the filename.
Spiders follow 301 redirects so that can't be used or can it?
Do you smell what I'm cookin?
If you can help me, I'd really be grateful
Thanks and I'm sorry this turned into an Epistle,
maleman
Edited by maleman, 09 October 2004 - 10:43 PM.