- for May, 2014

Console.log Shortcut

Here is console.log shortcut which could be useful debugging tool: // usage: log('inside coolFunc',this,arguments); // window.log = function(){ log.history = log.history || []; // store logs to an array for reference log.history.push(arguments); if(this.console){ console.log( ); } }; It is taken from this Paul Irish blog. Though here is… (Continue)

Detect Character Encoding Problems

What could be the possible cause of encoding problem on Web page? It could be that page is not having proper encoding set using <meta charset="UTF-8">. This better handled using Server (Apache) response header. It could be that text is not properly encoded. Text can come from Database or directly… (Continue)