Minh’s Notes

Human-readable chicken scratch

Minh Nguyễn
June 30th, 2004
Links
#176

Edit

Oh, the evaporation!

Chris Schlechter and Bill Dirkes have joined to create a new startup web design firm, Burning Igloo.

Chris has considered bringing me on board as the “browser compatibility consultant.” Heh. Imagine that. Sure, I may know a whole lot about browser idiosynchracies, but I’m the one who just tells my visitors, “Tough. I’m not going to pander to Microsoft’s laziness. Get a real browser.”

Like any website with a half-baked title – I just wrote that to garner comments (don’t you just love sensationalism?) – it currently has a mere three-line “under construction” message. I mean, they could’ve done better: remember my old Under Construction page?

By the way, I’m told that the site that I linked Bill’s name to isn’t even his latest one. But after having suffered through four or so redirects, plus the numerous redirects and alertboxes telling me that I’m horrible for not using a horrible browser

I quit here.


Comments

  1. Yeah, I think I can explain all of the redirects. But the story is a bit long to explain here. And yes, I did try to block all non-Internet Explorer users simply because the other browsers were incapable of displaying my simple JavaScript code that overrode the Geocities ads.

    The most current version is at http://ee.1asphost.com/billtonium/home.html but since then I rewrote the code into ASP, then got rid of the frames, then rewrote the site in PHP, and I'm too busy to put the finishing touches and post it on burningigloo.com, where you can expect to see it soon.

    Oh, and if you have a problem with our pitiful 3-line "under construction" message, you can complain until our mafia whacks you. We have connections. And since your "under construction" image has all stolen images, I don't really feel bad about our construction page, especially since nobody can even find the page using a search engine.

  2. “And yes, I did try to block all non-Internet Explorer users simply because the other browsers were incapable of displaying my simple JavaScript code that overrode the Geocities ads.”

    Incapable? Or adamantly opposed to doing so. Hehe. You see, your “JavaScript” must have actually been Microsoft’s proprietary (look that word up!) JScript.

    In any event, I didn’t see GeoCities’ ads, because I simply use a Firefox extension called AdBlock. It’s quite beautiful. I just installed, and I haven’t seen a banner ad, Flash or otherwise, since.

    “And since your "under construction" image has all stolen images, I don't really feel bad about our construction page, especially since nobody can even find the page using a search engine.”

    First of all, I had (and still have) legal right to use those images, as those images were bundled with a free, downloadable program from ArcaMax that I just *happened* to download.

    Second of all, I had linked to that page for almost a year, on the temporary Minh’s Notes that you can still find at http://mxn.netfirms.com/notes/ , albeit without the link.

    Any other questions?

  3. Actually, the "JavaScript" was the scripting language created by the wonderful people at Netscape, not the ripoff Microsoft version used for ASP and ASP.NET - it's not used for HTML.

    And, by the way, the simple JavaScript code used the document.write function to write out the HTML code over the Geocities ad. Now if the document.write function is too complex for Netscape - the creators of JavaScript - I think there's a pitiful irony.

  4. “Actually, the ‘JavaScript’ was the scripting language created by the wonderful people at Netscape, not the ripoff Microsoft version used for ASP and ASP.NET – it's not used for HTML.”

    Umm, yes, JavaScript was created by Netscape (originally as LiveScript). But Microsoft’s JScript *is* indeed used for HTML. Often, the only sign – and it’s a telltale sign – that a website is using JScript, disguised as JavaScript, is the use of one statement known infamously as:

    document.all

    And you used it. Line 35 of http://ee2.1asphost.com/billtonium/homemain.html reads:

    var e = document.all

    The nonproprietary, cross-browser (it works in IE too!) way of saying:

    e.news.style.display = "block"

    For example, is:

    document.getElementById("news").setStyleProperty("display", "block")

    It may be lengthier, but it is standard. That is, it was standarized by the World Wide Web Consortium, founded by creator of the Web, as well as the creator of the browser you cling to so dearly: Microsoft.

    The approach you keep on using is *so* mid-1990s. Welcome to the new millennium. And wait till I get started about XHTML.

    Anotherwords, it wasn’t document.write that tripped up other browsers, Bill. It was document.all. And it makes worlds of difference.

    But I didn’t see that ads anyhow. Many users of Mozilla-based browsers don’t either. So why bother telling someone what browser they aren’t (and subjectively should) be using?

  5. Unfortunately, you will notice that is the wrong page... my site at 1ASPHost didn't need the JavaScript trick because they only stuck a small text ad at the bottom of each page. So instead I added "" to the end of each page (which, yes, throws off validation).

    My point being, and I can send you copies of the files, was that Netscape was unable to render the CSS in the following example of code:

    (well, I wrote out a full example and your blog ate it, so you can view the code here)

    I was using the document.write function, not the document.all command you used so finely as the main argument against my code. You see, with the introduction of the site at 1ASPHost, not only did I rid myself of the hard-to-read anti-advertising scheme I created for myself, but I introduced an advanced version of the site that could change the font, font size, font color, and background color using client-side scripting (or in other words, no reloading of the page was necessary for the changes to occur).

    And actually, Netscape and IE do differ in that Netscape uses layers (document.layers) while IE uses document.all. Now, I've never heard of the browser differences being referred to as "JScript" - and since you can insert both the document.all and document.layers commands into a single script, I'm not quite following how Microsoft's JScript is taboo for me to use, especially since I warned you, upon entering the site, that certain features would not work (not simply that JavaScript... but also the ability to see the beautiful custom cursors, which unfortunately are not recognized by Netscape (actually FireFox at least uses the pointer cursor over links, which is a lot better than Netscape which uses the I-beam cursor).

    Why bother to tell somebody they aren't looking at a page that's displaying correctly? I believe your site warns me that "You are using Microsoft Internet Explorer right now. Internet Explorer does not support many of the features that I have built into this website. I highly recommend using Mozilla Firefox instead." Ironically, Internet Explorer renders your site better than Firefox - including better CSS alignment of the text to the background images and the CSS3 gradients being introduced by W3C (I'm confused though, by this statement: "Like the gradient effects? ... No, no JavaScript tricks, no special image formats – just a touch of proprietary CSS that will become standard whenever CSS3 comes out.
    If you're not using a browser that actually supports web standards (as opposed to just saying it does), such as Mozilla Firefox, you're going to be missing out on some nice features that I'll roll out soon.").

    Now that we seem to have effectively attacked each other, I'd like to end the fight simply by stating that I started picking up HTML a year ago. Take that as you will....

  6. Sorry, bad link to the file... try this. I'm sleep-deprived, so I'm going to bed...

  7. First of all, I never considered this a “fight.” It’s a lively discussion. :^)

    About the full example: I tried it in Firefox, and it works like a charm, except that it can’t load the (non-existent) stylesheet you referenced. (I realize it’s an example, so I won’t hold it against you.)

    ----

    “I was using the document.write function, not the document.all command you used so finely as the main argument against my code.”

    I used the document.all example to point out to you that JScript indeed exists, and that many people use JScript without even realizing it.

    ----

    “…I introduced an advanced version of the site that could change the font, font size, font color, and background color using client-side scripting (or in other words, no reloading of the page was necessary for the changes to occur).”

    That’s fine. But see places like http://alistapart.com/articles/alternate/ . Dynamic style modifications can be done with standards in mind. The simplest way doesn’t even depend on scripting. Just provide alternative stylesheets. Most browsers will offer ways to switch stylesheets, but since IE for Windows won’t, you can add a little JavaScript to make it work.

    There are many other ways of scripting it that work in multiple browsers. Microsoft’s MSDN even featured an article a year or two back that shows you how and makes it work in MSIE/Win, MSIE/Mac (it’s really a different browser), and Mozilla-based browsers.

    There are many creative ways of doing things that don’t require scripting. IMHO, scripting is the easy way out, and it rarely accomodates people who don’t have the same settings as you do.

    Alternatives to scripting, such as CSS, XBL, and HTC, when used and combined creatively, take into account people who disable JavaScript, use marginalized browsers, or have disabilities.

    ----

    “…I'm not quite following how Microsoft's JScript is taboo for me to use, especially since I warned you, upon entering the site, that certain features would not work”

    JScript is not taboo, even if I may treat is as such. (Hey, I’m generally anti-Microsoft. What can I say?) And my point originally was that you *didn’t have* to warn me.

    I, and the hundreds of thousands of others who use minority browsers, use them by choice. We use them because we are sick of Microsoft’s software architecture (which leads to security vulnerabilities). We use them because we actually prefer a feature that Microsoft just doesn’t have. We use them because we believe in technological progress, something that Bill Gates once advertised about and his company soon forgot about. We don’t need to be told continually of our choice.

    I have that message at the top of my homepage because I want to promote what I believe is a better browser. But I tried to maintain a balance: it’s not incredibly annoying, yet it still communicates my message.

    Now let me get off my soap box.

    ----

    “…not simply that JavaScript... but also the ability to see the beautiful custom cursors, which unfortunately are not recognized by Netscape (actually FireFox at least uses the pointer cursor over links, which is a lot better than Netscape which uses the I-beam cursor).”

    First of all, I hope you don’t think I’m defending Netscape. I despise Netscape. Nevertheless, all Mozilla-based browsers (including Netscape 6/7) recognize CSS’s cursor property. The reason the custom cursors aren’t showing up is that Mozilla-based browsers don’t currently recognize (again, proprietary) CUR files. A simple solution: create a BMP version as well, and turn this line, for example:

    a {text-decoration: none; cursor: url(BMlink.cur)}

    Into this line:

    a {text-decoration: none; cursor: url(BMlink.bmp); cursor: url(BMlink.cur)}

    This way, not only does it work in more than one browser; you’re also taking advantage of the key feature of CSS: the cascade algorithm. (Indeed, CSS stands for *Cascading* Style Sheets.)

    ----

    “Ironically, Internet Explorer renders your site better than Firefox – including better CSS alignment of the text to the background images and the CSS3 gradients being introduced by W3C…”

    Yes, that’s right. I gave into someone by providing the IE-friendly version of the stylesheet. I’m bringing back the original stylesheet soon, though, and I’m going to use a few (standards-based) tricks to make sure that IE still uses the IE-friendly code.

    “I'm confused though, by this statement…”

    I’m saying that I didn’t have to resort to JavaScript to make the gradients. And I’m saying that I don’t need to use PNG with alpha transparency (which only Mozilla-based browsers currently support). I simply used some CSS.

    Why did I suddenly fall off the standards-based dogma? Because it isn’t dogma to me, it’s merely doctrine. I will be pragmatic at times. You see, my CSS-based approach will degrade quite nicely in browsers that don’t support it. The gradient simply doesn’t show up.

    ----

    “I started picking up HTML a year ago. Take that as you will....”

    Alright. But it doesn’t hurt to learn it The Right Way™ early on. That way, you won’t get teased about your early creations on down the road. Remember that overly animated Under Construction page of mine? *I* even laugh at it for goodness sake.

    Think of it this way: the website you create for your Web design firm is your primary portfolio. How much attention to detail (standards, accessibility, usability, etc.) you incorporate into your website will either attract or repel your potential clientel.

    But before I start sounding like a how-to book on startups, I’d better have dinner. Thanks for commenting.

  8. If you have a JavaScript taht blocks ads on a Geocities free web apge, wouldn't that be illegal by breaking the TOS?

  9. Hello Minh, I came upon this site when searching for a resolution to my problem: my custom .cur file cursor will not show up in Firefox, and I have version 2.0.0.11.

    As of now my tags look like this (one for the page itself and the other for hovering over links on my web page):

    <style type="text/css"> <!-- body {cursor: url('pig.cur');} --></style>
    <style type="text/css"><!--a:hover {cursor: url("pig.cur");}--></style>

    I tried your suggestion of placing a bmp (and even a gif) within my current tag, but then neither IE nor Firefox work with my cursor:

    <style type="text/css"><!-- body {cursor: url('pig.cur'); cursor: url ('pig.bmp');} --></style>

    I tried this separately and it worked in Firefox (apparently it requires a default?) but then no longer worked in IE:

    <style type="text/css"><!-- body {cursor: url ('pig.bmp'), default;} --></style>

    Do you know of what tag would possibly work for both Firefox and IE???

    Thanks for your help.

    Anita

    1. What operating system are you using? It works for me on Firefox 2.0.0.11 on Windows XP, but not on the same browser on Mac OS X, which is consistent with the Mac’s custom cursor support in other programs.

      If you’re using Windows, some other possibilities are that perhaps your cursor file resides on a different domain than your webpage. For security reasons, browsers like Firefox don’t tend to allow JavaScript and other things to be embedded from other websites.

      You may want to see this reference for details on the exact syntax and how to make it also compatible with IE. (By the way, Firefox now supports .cur files for cursors.)

      If all else fails, you can also try this rather brute-force way of getting a custom cursor, involving some JavaScript.