NOSCRIPT for nerds. Stuff that disappears.

So, this is what a random Slashdot page looks like in Opera. That peaceful, white space in the centre sure isn't in the spirit of /. – or what? And why is there some odd overlapping box in the top left navigation area?

Sure enough, some text is missing, as re-loading with JavaScript disabled will show. The disappearing content occurs right after an ad script (URL will not unlikely die soon. Ads aren't exactly Cool URIs, but we already knew that..). Read this closely:

document.write('<script src="$$$$&ord=4781511"></script>');document.write('n<noscript>n<a href="" target="_blank"><img src="" border=0 width=336 height=280></a>');

First time I saw an ad script do

document.write('<noscript><img src="..."></noscript>')

I laughed. Certainly a remarkably braindead way to include your fallback contents. But Slashdot's ads take it a step further: they use document.write to insert a NOSCRIPT tag but do not close it, hence hiding random amounts of content until the next NOSCRIPT close tag appears in the source! And it's not an Opera problem, it occurs randomly when you get the ads that come with the broken script, and happens in all browsers. In other words, Slashdot has finally proven that GUI browsers are unreliable and that everyone simply should telnet to port 80. Great news for nerds.


14 thoughts on “NOSCRIPT for nerds. Stuff that disappears.

  1. telnet 😆 Is Opera going to make a text browser like Lynx :wink:? But in all seriousness using a script to tell a program what to execute if no scripting is available is the height of stupidity.

  2. This is another good example of why markup from ads should not be dynamically inserted into pages alongside content. It significantly slows down the loading time, and it can wreak all kinds of havoc on the layout. Ads should be loaded separately, e.g. in an iframe element (for compatibility) or an object element (when it's better supported).

  3. @HeroreVI agree with you that ads should be loaded separately, possibly via objects, but iframes? I'm looking forward to the end of iframes, haha. If all ads were inserted via iframes then it would actually be cool in one aspect…we could write a simple script to remove all iframes from every page upon loading and get ride of all ads, haha.

  4. :lol:Whats the point of a noscript tag written by javascript? Nothing will render if Javascript is turned off this way anyway.Looks like there need to be more decent ad scripts, as the one shown doesn't know how to code for a browser 😛

  5. Wait, you've never seen an ad script write out a script tag and use the comment-hiding hack within the script tag? I thought that was fairly standard, if stupid, practice.

  6. It amuses me that Slashdot even uses that much JS in the first place. Certainly a good share of their target group are in the "JavaScript is insecure crap and my browser shall never ever compile and run something it found on the net" camp? So why has Slashdot started playing with JS?Well, the answer is obvious… Oh, and Slashdot: I know you think Digg is cool, but isn't including both Prototype and YUI a bit.. over the top??

  7. It's just what the adcompany receives from their customers and they copy/paste it into their adsystem which turns it into d.write() statements for the sites that require JS-injection for ads.Yes, it's a recipe for disaster if you inline those scripts, not to mention the fact that it stops rendering *your* content until the ad has loaded.We also use JS-based ad-injection, but load them in seperate 'containers' *after* out content and use some additional JS to move them to their right position 🙂

  8. hallvors,I thought you might enjoy the comment on the following post as it's very much the same as this situation, lol:It's in the second post, just search for this:

    I hope you can see the irony here. Actually I've seen such absurdities in the the wild a few times.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s