Y’all know about the The Coral Content Distribution Network, right? If you don’t, and you’re putting large files online, you should: it’s a free edge network. (Like Akamai – you’ve heard of them, right? They’re the reason Google always loads fast.) Only you don’t need to pay up big bucks and then set up stuff on the server end, like with Akamai: you just stick.nyud.net:8090 at the end of the hostname part of any HTTP URI. When someone accesses that URI the first time, the Coral network picks up a copy from the original server and caches it. As long as the file is in cache, anyone who asks for it gets his copy from a nearby Coral node, whose bandwidth generally dwarfs the original server’s. It’s a very cool project and service.
It’s so much cooler than their homepage HTML.
See, they have this little form on the page, for people who don’t understand technobabble and all that crazy talk about “hostnames” – just put the URI in the text box and it sends you to a CoralCDN-served version of the URI. That is nice.
Much unlike the HTML:
<center>
<input type=text size=14 id="theurl"
value="www.cnn.com" onKeyPress="return isEnter (this, event)">
<input type=button name="go" value="Go"
onClick="window.open (coralize (document.getElementById ('theurl').value))">
</center>
Ah well. They skipped the redirector script on the server, and just use the Javascript string functions to inject the.nyud.net:8090 part at the right place of the user’s input and then set window.location. Right?
Right?
<script type="text/javascript">
function coralize (urlField)
{
var hdr = "http://redirect.nyud.net:8090/?url=";
var total = hdr.concat(urlField);
return new String (total);
}
function isEnter (urlform, key)
{
var keycode;
if (window.event)
keycode = window.event.keyCode;
else if (key)
keycode = key.which;
else
return true;
if (keycode == 13)
window.open(coralize(urlform.value))
return true;
}
</script>
Err, right.
Someone tell me what would have been wrong with this:
<form action="http://redirect.nyud.net:8090/" method="get">
<center>
<input name=url type=text size=14 value="www.cnn.com">
<input type=submit value="Go">
<!-- look ma, no Javascript! -->
</center>
</form>
Rude Golberg's legacy lives on (Score:1)
(although I guess that in these days and age of AJAX, our Rude Golberg-wannabe could have done much, much worse...)
Re:Rude Golberg's legacy lives on (Score:1)
similar) -- collection of JavaScript code, uses anonymous functions to pretend
class-y -- just to have expanding menus based on mouse movement. That does not
faze the head developer as, paraphrased here, all the code would be only be some
80-100 kB and would be cached for a week; further, the appearance of JavaScript
code used as OO-like trumps the previous objection in any case.
Ok, I can discount the last reason as OOP seems to be *S
- parv