September 24, 2009

Browser's limitation on cookie

Interestingly, now most of them have come to a standard value on their limits. If you've ever worked on client side (i.e. javascript coding), you would really appreciate this and understand why its worth mentioning here. Here are the details:

Per domain limits

  1. Firefox - Both 2.x and 3.x allow 50 cookies per domain
  2. IE - Until IE6.x they supported only 20 cookies per domain and IE 7 and above this limit has been increased to 50 cookies per domain
  3. Opera - Opera 9 allows only 30 cookies per domain
  4. Safari - No limits

Maximum Cookie Limit

  1. Firefox - Both 2.x and 3.x allow 1000
  2. IE - Some posts suggested its 300. *
  3. Opera - 65536
  4. Safari - No limits


Maximum Cookie Size Limit

  1. This is almost uniform across the browsers (because they try to adhere to RFC 2109(Section 6.3) and limits to ~4KB = 4096 bytes

If you ever exceed any of these limits, browsers may behave differently. IE and Opera use LRU to decide which cookies to delete. FF seems to be using something different from LRU *.

So if you follow Graded Browser Support methodology for your website, here are the recommendations:
  1. Keep your cookie count to <=30 per domain. Remember that subdomains can access root domains cookies as well (so xyz.abc.com can access cookies for abc.com domain)
  2. Cookie size should not be more than 4096 bytes
  3. Use some of the standard libraries YUI Cookie or Ext.util.Cookies for cookie handling

And never forget that cookies are an overhead for any website. Most of the browsers would append them to each request that is sent from the client side; some of them are smart enough to figure which particular "path" really needs them (this depends on which path the cookie was set for). And there is limit on the header size that a server can handle, for example Apache puts a limit of ~8KB. I don't know about others *.

* - I did my part of research but ended up with no results. If you've any concrete information, please share with links in comments

September 20, 2009

syntax highlighter for blogspot

as you might see now, i've the source highlighter plugin enabled. thanks to this post, it went really smooth this time.

September 15, 2009

javascript snippet for getting url parameters

function getReqParam( name ) {

 name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");

 var regexS = "[\\?&]"+name+"=([^&#]*)";
 var regex = new RegExp( regexS );
 var results = regex.exec( window.location.href );

 if( results == null ){
  return "";
 }
 else{
  return results[1];
 }
}
i will explain the logic later on ;-) that reminds me, i also need to add a source code highlighter to my blog.. hang on until the long weekend, will get it done!!

September 03, 2009

Thought of the day...

A thought just came across that its been really long since i posted a "Thought of the day.." and why is it so? I guess i'm getting stable now :-), less worried and more productive and no more of those meta-thinking that i used to do few months back. To hell with that, who wants to waste the precious time!!!? ;-)

August 29, 2009

Comparison of online payment gateways in India








































































Found this analysis here and thought to keep it handy for future needs. The information doesn't seem complete and if you've more information to add or correct this information, please do share in comments. Two of my friends needed this information immediately, so here you go buddies...
GatewayOne time setup feesTransaction Cost (CC/DC)Transaction Cost (NetBanking)Annual Maintenance Cost (AMC)Supported CCsSupported Banks
CCAvenue75007%4%1200VISA, MasterCard, Amex, Diners, JCBHDFC, ICICI, AXIS, IDBI, CBoP, Citi, BoB, BoI
DirectPay (TimesMoney)



VISA, MasterCardHDFC, ICICI, AXIS, IDBI, CBoP, Citi, Centurion, Yes, BoP, BoI, PNB, Kotak, Karnataka, Vijaya, BoR, SIB, Corporation, OBC, Federal
EBS (Axis Bank)60006%6%2400VISA, MasterCard, DinersHDFC, Axis, Citi
ABC Payments (IndiaMart)100007%7%NilVISA, MasterCard, DinersHDFC, ICICI, AXIS, IDBI, CBoP, Citi, IndusInd
HDFC





ICICI PaySeal300003.5%
10000VISA (no MasterCard)

Installing Agilo - Agile plugin over Trac

[If you are looking for instructions on installing Agilo over Trac, click here to skip to the instructions directly]

Finally a post on my current work in my new organization. :-) Its been running really busy with lot of things going on in parallel; but i must admit it, it feels lively after a long long time here and that's one reason you find me posting this entry at 2:30 past midnight (no.. i'm not working on project related stuff, but i find my enthusiasm back on finding new stuffs that can help my team and the organization perform better).

We, the newly formed engineering team here have decided to follow agile and scrum based processes in all our projects and the organization as whole. We recently installed Trac (a fantastic python based open source tool on one of our servers), but this provided very minimal UI for wiki, source code browsing, ticketing system and milestones tracking and had missing features like user management, ticket hours management, scrum features like (product backlogs, sprint based management and progress tracking). So we explored more and came across this nice plugin over Trac - called Agilo. Agilo is open source and provides some pro features in a licensed version with support. Well what we were looking for was pretty much available in the open source version so we went ahead with the same.



  1. First install setuptools for python by running
    wget http://peak.telecommunity.com/dist/ez_setup.py

    python ez_setup.py

  2. Install Trac. (need help? read here or here)

  3. Install simplejson by issuing
    easy_install simplejson

  4. At this step, its assumed that your trac is up and running :-) Download Agilo source code from here (you need to be logged in to download this) and untar it using
    tar xzvf agilo-source-latest.tar.gz

    Go to the source folder and issue
    easy_install [source-untarred-folder]

  5. At this step, you need to enable this for your projects. Assuming that you've a project installed in /var/trac/project1, you need to add the following to your /var/trac/project1/conf/trac.ini

    [components]
    agilo.* = enabled
    agilo_common.* = enabled


  6. Do an upgrade on the project by issuing:

    trac-admin /var/trac/project1 upgrade

    which should output something like below:

    Creating Product Backlog...
    Creating Sprint Backlog...
    Upgrade done.

    This means your project has been upgraded to use Agilo on Trac. Restart your trac instance.

  7. I wasn't successful in my first attempt because my simplejson installation wasn't proper for some reason, so i did a
    locate simplejson

    removed the simplejson egg and then did
    easy_install simplejson

    again. For me, the path of simplejson to be removed, was /usr/lib/python2.4/site-packages/simplejson-2.0.9-py2.4-linux-x86_64.egg



It was very satisfying to see the Agilo UI over Trac. We've already created a/cs for the entire organization (engineering, product management, analytics and support functions) and our CEO, CTO also have an a/c on the system. Everybody is excited about the new system :-)

[PS: if you still have problem, do post your issue here.]