Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Wednesday, January 20, 2010

Best Javascript and Css Compresser - YUI Compressor


Brief Advantages of YUI Compressor


  • Easy to use

  • High compression rate

  • Reliable end results (doesn't mess up the code)



If you are looking for a good compressor for your javascript YUI Compressor is the way to go.

Great compression rate, well tested and in use among many top sites, and well, personally recommended by me.

I've used it for my projects without a single JS error or hiccup. And it has nice documentation.

Note: Although Dan Edwards's packer achieves a better compression rate than YUICompressor, I ran into a few JS errors when using it.

Tuesday, September 1, 2009

Javascript XML Parsing Problem Solution in Internet Explorer

function loadXMLDoc(dname)

{

var xmlDoc;

if (navigator.userAgent.indexOf('MSIE')>=0)

// Internet Explorer

{

xmlDoc=new ActiveXObject("Microsoft.XMLDOM");

xmlDoc.async=false;

xmlDoc.load(dname);

return xmlDoc;

}

else

{

xmlDoc=new window.XMLHttpRequest();

xmlDoc.open("GET",dname,false);

xmlDoc.send("");

return xmlDoc.responseXML;

}

alert("Error loading document");

return null;

}