[thelist] Site redirect check : old browser

.jeff jeff at members.evolt.org
Wed Jun 6 15:48:39 CDT 2001


mark,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Mark Cheng
:
: > what's going to keep the redirect from
: > kicking them back into the "browser
: > compliance complaint" page or are you
: > going to have two versions?
:
: simple JS  to do a history check - if their
: previous hit was to the nobrows page let them
: through, or maybe a cookie?  Haven't decided yet.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

nope, can't do it that way.  you can't read each individual entry in the
history object.  you can only read the length.  before you assume that
document.referer will fit the bill, let me remind you that not all browsers
expose the referrer to script, while other browsers inaccurately report the
referrer.  in short, it can't be relied upon.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: the text version is not a copy of the site.
: It contains a couple of documents -latest
: announcement etc.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

why?  don't you think the user could use the rest of the information in the
site?

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > however, intertwining this goal with the
: > wasp initiative is not necessary.
:
: True, but seemed to be linked and people tend
: to take action more often if you give them the
: perception they are falling behind in some way.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

yup, by leaving your site and never coming back.  telling the user they need
to upgrade is not going to make it happen.  they've gotta decide on their
own they want to do that.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: 1) why do I need a backend database to separate
:    style from content?  Does it matter where the
:    content sits?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

yes, very much so.  if the content is in the same file with the html then
there's no separation.  you can't change the design of the site without
having to edit every page on the site.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: 2) there is only one version of the site.  the
:    text only has a couple of links in it to
:    recent announcement and thats it.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

doesn't sound to me like that's going to address the needs of the user very
well.  it sounds more like you're taking the easy way out cause you can
perceive the future maintenance issues involved with two versions of the
site.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: 3) the whole point of the redirect is so that
:    I don't need complicated user agent based
:    delivery of the page.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

i didn't say you *needed* complicated user agent based delivery of each
page.  i said that if you *could* if you wanted to.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > for example, it took me all of about an hour
: > and a half to go through the process of
: > "skinning" all of evolt.org for avantgo, an
: > offline web service for palm users.
:
: Not knowing anything about designing for palm,
: could I use a stylesheet that specified images
: display:none (like the print one i have) and
: reset the colors to normal to achieve the same
: effect?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

no, it's not that simple.  you have to send a special palm-only meta tag to
the palm users.  you have to restructure your html so it's as simple as
possible.  the overall width of your content is critical as well.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: The code was laid out so that the content should
: come pretty close to the top for anything which
: doesn't deal with Css-P.  The problem is in the
: JS navigation & DHTML.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

so go back to the drawing board with the navigation and dhtml.  make the
navigation work for non-js/non-css browsers.  then, go back and add in the
css and js without losing any of the original functionality.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > what is there about the "latest standards compliant"
: > site that is going to be problematic?
:
: If the browser doesn't support getElementByID or some
: form of attachEventListener, the nav, rollovers and
: expanding divs won't work in the Ranger site.  Oh, it
: also has to actually display the object when the
: display property is changed from none to block.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

so set up the page so it's display is "block" initially and set it to none
via script -- if the browser supports getElementById.  now the site will
work for non-css and non-js browsers, but have the additional nicety of the
dhtml for newer browsers.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > it's up to you the programmer to take the
: > necessary measures to eliminate those problems.
: > this is not a valid excuse to use a redirect
: > for older browsers.
:
: I have - hence the redirect.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

the redirect does not solve the problem -- it only hides it behind pushing
away any browser you haven't tested the site with.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: I am not going to litter my JS with hacks to deal
: with document.all, document.layers and various
: other DHTML issues to support old browsers.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

i'm not suggesting you do that.  all i'm saying is that before you attempt
to access certain objects or methods that you check that the browser
supports it.

if(document.getElementById)
{
  // supports getElementById;
}

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: A) Because I have no idea what the problems are;
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

no time like the present to learn.  if you're going to do this for a living,
you're going to have to know what the problems are.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: B) because I can't test anyway (I choose not to
:    spend time downloading out of date browsers)
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

again, if you're going to do this for a living, you better make the time to
have every one of the most common browsers on your system to test with.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: By using DOM I've removed a lot of the mouseover
: and mouseout attributes from the HTML which made
: the code much easier to read (and type!).  DOM
: manipulation looks to be a really easy way to get
: some interactive effects eg searches, dynamic
: pages client side etc.  I'm looking forward to
: exploring that area.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

so explore that area, but try not to do it in a way that makes the
information it interacts with inaccessible to others.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: One page does not this site make.  I need the
: redirect because without DOM/ECMA support they
: won't be able to:
: 1) use 2nd level navigation
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

leave the 2nd level nav open by default for the section they're viewing.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: 2) expand the images
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

set up the images so that clicking them takes you to the image directly on
the server by default, unless you've got a js-enabled, standards compliant
browser in which case you'll just expand the image right there on the page.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: 3) expand drop down menus for press releases etc.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

they're expanded by default and then collapsed onload for standards
compliant, hs-enabled browsers.  or, better yet, just leave it expanded.
that'll give a better indication to the user that there is more to explore
in that section.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: thats why I need the warning.  Aardvark's point was
: well made - by relying on JS there is a hole in the
: redirect. someone sent me some PHP to do a server
: side detect which is probably a better idea all
: round.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

php redirect can't detect actual support for particular objects or methods.
it also can't detect whether or not javascript is enabled or not.

better idea -- ditch the redirect.

on a sidenote -- if i'm using a browser that gets redirected am i now stuck
on your site and unable to use my back button to get out?  if so, you've
just pissed off the user even more.  if not, you've used a javascript
redirect method that's not available on the older browsers
(location.replace() was introduced in js1.1).

thanks,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thelist mailing list