Skip to content


Can Anyone Beat This?

The original vX function was 337b. Now, it’s been reduced down to 293 bytes, while adding a new feature (callback is now optional).

X=function(u,f,p,x){x=window.ActiveXObject?new ActiveXObject('Microsoft.XMLHTTP'):new XMLHttpRequest();x.open(p?'POST':'GET',u,!0);p?x.setRequestHeader('Content-type','application/x-www-form-urlencoded'):p;x.onreadystatechange=function(){x.readyState==4?f?f(x.responseText,x):f:0};x.send(p)}

Apparently, the above stuff doesn’t work (WordPress?)

It’s really quite amazing. The big things that reduced size were using lots of condititional things, really obfuscated unreadable stuff, and using !0 instead of true, and !1 instead of false.

If you want to use it, try building your own copy from.

http://vxjs.googlecode.com/svn/trunk/build.htm

The usage has signifigantly changed though, there, everything’s namespaced under an underscore, so it’s _.X(“url”)

Posted in vX JS.

Tagged with , , , , , .


5 Responses

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

  1. josep_ssv says

    See the line 366 of format.js in http://www.onlypaths.com/aaopblog/2008/10/16a/
    I not have managed vX Ajax Function use for upload files.

  2. josep_ssv says

    In http://onlypaths.com/aaopblog/2008/10/14/
    I include the vX JS Library
    I have not been able to vX Ajax Function

  3. admin says

    Try getting one from:
    http://vxjs.googlecode.com/svn/trunk/build.htm

  4. josep_ssv says

    Eso es interesante!!

  5. aldo says

    Cool XD

    Now to figure out how to use it xD



Some HTML is OK

or, reply to this post via trackback.