Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

There is a comprimise. But it may change the way you think about designing sites as well as coding them.

It is quite possible to use a subset of most of the "new" technologies that either:

  1. work in all browsers in some fashion or other
  2. fail gracefully -- meaning the site can get by with not having the browser be able to render a given technology

It is first important to note that "coding for the latest browsers" does not mean that you have to use 10 pages of javascript,css and the like. Honestly the first step to coding to modern standards won't affect older browsers' ability to render your page one iota. That is using XHTML (either 1.0 or 1.1). You can go so far as to use the strictest version of XHTML, and the older browsers will still render it fine. This would be an example of the first point above: a technology that works in all browsers.

A second example of number one is a technology that works "in some fashion or other" in all browsers. I will caveat and mention that I mean all 4.* and higher browsers, but I can explain how it will do no damage to earlier browsers that do not support it. What I am referring to is a subset of CSS. All 4th gen and higher browsers support some subset of CSS -- wether they agree on how to render it is another matter. But this brings me to my next point.

If you're coding for a large audience that uses such a wide variety of browsers, you should stop caring if your site looks 100% the same in every browser. It won't happen. Not in any practical way. And trying for 100% similarity becomes a maintinence nightmare. If one small change needs to be made to a page, you then have to re-check in every browser -- and probably make small changes for every browser's sake.

So if you take the plunge and commit to the philosophy that it's "ok" to have your sites look a bit different from browser to browser, there are a couple steps you can take to make your transition a success:

  • Structure your documents well. Use a header tag ( <h3> for example) to mean "this is a header," not to mean "this is a bit of large, bold text." Use paragraph tags to say "I want a paragraph here" not "I want more space between these lines than a line break will give me." Most importantly, use tables to mean "here's some tabular data" not "ooh, here's my page layout tool."
  • If you decide to try CSS positioning for the browsers that can handle it (I can hear cries from certain monks to turn away from the dark side), make sure you order your block elements in such a way as they still make logical sense if you were to read them on-screen in the same order as they're listed in the file. I actually like using lynx to check on this.
  • Do your homework. Be aware of what does and doesn't work for different browsers. Acquiring this knowledge will keep you from experiencing suprises, and will probably speed up your productivity. There are quite a few good sites that give easier to understand explanations of those wonderful w3c standards. I also find Westciv's CSS guide to be invaluable.

I'm sure everyone will weigh in on the subject of javascript, but I'll just throw in my opinion on the matter. If you use javascript, make it so it is a convenience to those who have it, but not an inconvenience to those who don't. The subset of compatible javascript between browsers is so small that in 98% of situations where you could use javascript, you probably shouldn't. And there is never a place where you can't get by without it.

So you can code to modern web standards without throwing out older browsers. You may not get to use all the toys in your toolbox, but it does not mean that you need to wallow in 5000 nested tables.

In reply to Re: Internet. Who should conform to who? by AidanLee
in thread (OT) Internet. Who should conform to who? by BUU

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-07-02 15:17 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (103 votes). Check out past polls.