Skip to content

vX Ajax is almost 10 bytes smaller

Okay, so 0 = false, so it makes sense that !0 = true. but also 1 = true, so that saved 1 byte.

Since there’s no .readyState attribute > 4, instead of .readyState == 4, you can do .readyState>3

the big one was ActiveX, which was originally


I noticed how this.activeXObject was repeated unnecessarily. So i added a new variable y


then I did:


thanks to dynamic languages, I could use x, and just reset it to something else (saving a variable declaration!)


Now I just need to find a way to shrink x.setRequestHeader('Content-type','application/x-www-form-urlencoded')

Posted in vX JS.

Tagged with , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.