PDA

View Full Version : Browser redirect? or a single page?


Veneficus
06-28-2003, 11:56 AM
Greetings, everyone. I'm new to these forums, this is my first post :o

I have been away from the on-line world for a little over a year, though in the past I had a couple of halfway decent websites related to Dungeons & Dragons. In my previous websites, I innevitably had 2 versions of each page, with index.html being nothing more than a browser redirect script which would send viewers either to the IE version or the NS version. Many thanks to Dynamic Drive for that script. :D

Now that I'm back on-line, I'm wanting to start working on a new website, and the first thing I notice is that IE6 appears to have some great capabilities, especially with regard to CSS. IE6 recognizes styles that earlier versions do not. I do not use Netscape, but I assume there are things NS can do that IE can't, and vice-versa. Therefore, my instinct is to fall back on double pages with the browser redirect.

However , it seems that the old redirect script from Dynamic Drive is fine for IE4+, NS4+, and NS6, but not for IE6.

My original plan in posting here was to ask if anyone could help me out with the redirect. However, after reading a few posts on some of the other threads, I get the impression that "one page for all browsers" might be preferred.

So, in the words of the coolest robot ever, "NEED INPUT!"

Also, apologies if I'm a little too verbose.

Nightfire
06-28-2003, 01:25 PM
Just make your code valid and then your pages will look fine in all browsers, it'll be much better than creating about 6 differnt versions of your site for each type of browser :)

kansel
06-28-2003, 06:54 PM
as far as detection/redirect scripts go, the only browser that's still somewhat in use that really really pukes at newer css is Netscape4 of course, and the best detection script for this beast is document.layers. NN4 was the only browser to ever use this object.

if(document.layers)
// NN4 stuff here
else
// all other browsers

there are more advanced detectors, including ones that separate out browsers that recognize DOM, CSS and such

of course using a bit of css trickery will allow you to built a really good looking site in new browsers but still let NN4 see it in a plainer form.

<link rel="StyleSheet" type="text/css" media="screen" href="all_browsers.css">
<style type="text/css" media="screen">
@import url(new_browsers.css);
</style>

since NN4 doesn't understand the @import command it will use only those styles defined in all_browsers.css, newer browsers will use both all_browsers.css and new_browsers.css in which you can use fancier styles or override those from all_browsers.css

cg9com
06-29-2003, 08:19 PM
W3Schools (http://www.w3schools.com) - Click on 'Learn XHTML'
Valid coding will save you trouble.
Originally posted by Veneficus
So, in the words of the coolest robot ever, "NEED INPUT!"
What a corny movie. :cool:

Veneficus
06-29-2003, 10:09 PM
Thank you, Kansel.
I had not thought of the @import function.I shall use it.