Posted On: Mar 20, 2024
Before HTML5 LocalStores was done with cookies. Cookies are not very good for large amounts of data, because they are passed on by every request to the server, so it was very slow and in-effective.
In HTML5, the data is NOT passed on by every server request, but used ONLY when asked for. It is possible to store large amounts of data without affecting the website’s performance.and The data is stored in different areas for different websites, and a website can only access data stored by itself.
And for creating localstores just need to call localStorage object like below we are storing name and address
<script type="text/javascript"> localStorage.name="ABC"; localStorage.address="New Delhi India."; document.write(localStorage.address); </script>
Never Miss an Articles from us.
HTML5 is the most recent version of the HTML(Hypertext Markup Language). It is a language for structuring and displaying content for the World Wide Web, a core technology of the Internet...
The < !DOCTYPE> is an instruction to the web browser about what version of HTML the page is written in. AND The &l..
Some of the most interesting new features in HTML5:The <canvas> element for 2D drawing The <video> and <..