Tag Archives: JavaScript

LlamaWorld

Although there are no llamas in LlamaWorld, there is plenty of JavaScript.  In fact, almost the entire world is JavaScript.
At the moment, most of LlamaWorld’s code is directly taken from an example on the Mozilla Developer Center.
If you beat the first (and currently the only) level, please take the survey when you are asked.  I’ll be [...]

VKitty

An online friend of mine has tried to make a virtual cat game several times and gave up each time.  But this time is different.  This time, she has the support of a programmer, and I won’t let her give up.
The new VKitty is all ajaxified, so there is only one full pageload for each [...]

Unpacking /packer/

Ever since I started working on the mostly Ajax app “VKitty“, I’ve been looking into JavaScript compression, and trying to figure out how it works.  Most compressors have very simple ways to compress JavaScript, by simply removing whitespace, but Dean Edwards’s /packer/ defies the simplicity of most compressors by making an unreadable function that acts [...]

The ultimate site redirect

Add the following lines to your .htaccess file:
RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
of course, you would change example.com to your domain name, and example\.com to your domain name with backslashes before the dots.
Add the following JavaScript to a file that is common to your whole website.
try {
    if (window.top.location.href != document.location.href) {
        window.top.location [...]

Browser Warz-Part 3: Things just got interesting.

In all of the previous Browser Warz competitions, there were only 4 competitors.  Now, there are 26.  Now, I hope you’re thinking “26 browsers on one computer? This guy must be crazy!”, because I am.

However, unlike the other Browser Warz competitions, the browsers in this competition will be facing other versions of their own kind before going on to face the winners of each individual competition.

There are 4 things that the browsers will be scored on in this leg of the competition:

  • CSS errors (Is the purple header there?  Does the body of the page match up with the header?  Is the footer matching?  Are the horizontal rules hidden?)
  • JavaScript errors (Are there any?  How bad are they?)
  • Speed of the 3 tests (How fast were each of the three tests?  How long did it take 5 repeats of each test to occur?)
  • Total time taken on the tests (How many seconds did it take?)

The 26 browsers are split up into 5 categories:

  • Internet Explorer icon for Browser Warz Internet Explorer (7 browsers, page 2)
  • Firefox icon for Browser Warz Firefox (4 browsers, page 3)
  • Opera icon for Browser Warz Opera (6 browsers, page 4)
  • Netscape icon for Browser Warz Netscape (7 browsers, page 5)
  • “Other” icon for Browser WarzOther (2 browsers, page 6)

This competition, because it is so long, is divided into pages to reduce loading time.