image

The Coding Studio Inc. Tips

Cookies & Co.: Storage Options in the Browser

Published:

For the longest time, cookies were the only option to store information locally within the browser. Even today they are mainly used in combination with server-side sessions. However, thanks to HTML5, we have another option to locally deposit data in the browser. There’s the “Application Cache”, as well as “Web Storage”, and IndexedDB. But what are the different storage options there for and what can they do? Saving Settings and Sessions Using Cookies Cookies were already around during the Netscape days. They are used even today to save settings for websites and web services, or to manage sessions. A cookie is a text file that can contain up to 4 KB of text. You can set up cookies via JavaScript or server-side via PHP. They are mainly important in combination with sessions. Whether it’s about the log in on social networks or in online shops: a cookie placed after the log in makes sure that the website recognizes you as a user. The special thing about cookies is that you can add an expiry date to them. Thus, cookies usually have a limited lifespan. If no lifespan is set, a cookie will expire upon closing the browser. Generally, cookies can only […]

Read More

A quote within 24 hours

Contact Us