Cookies
A cookie is a bit of information that the server can give to a client.
On every subsequent request the client will give that information back to the server, thus identifying itself.
A cookie is basically a string that contains several fields.
A server can send one or more cookies to a browser in the headers of a response.
Advantages
Cookies are very useful for retaining information through repeated visits by a browser.
Disadvantages
Not all clients support or accept cookies.
Even if the client does support cookies, the user may have turned them off.
Furthermore, the cookie specification says that no cookie can exceed 4 KB in size.
Only 20 cookies are allowed per domain.
A total of 300 cookies can be stored on the client side. Some browsers may have higher limits, but you can’t rely on that.
Finally, you have no control over when browsers actually expire cookies.
If they are at capacity and need to add a new cookie, they may discard a cookie that has not yet expired.
You should also be careful of setting cookies to expire quickly. Expiration times rely on the client’s clock being as accurate as yours. Many people do not have their system clocks set accurately, so you can’t rely on rapid expirations.
******************************************************
No comments:
Post a Comment