![]() |
HTML web storage; better than cookies. The two mechanisms within Web Storage are as follows:
The Web Storage is one of the great features of HTML5. With the Web Storage feature, web applications can locally store data within the browser on the client side. It stores data in the form of key/value pair on the browser. Web Storage sometimes also known as DOM storage. Storing data with the help of web storage is similar to cookies, but it is better and faster than cookies storage. In compared to cookies Web Storage has Following Advantages:
Types of Web StorageThere are two types of web storage with different scope and lifetime.
|
<!DOCTYPE html>
<html>
<body>
<div id="result"></div>
<script>
if(typeof(Storage)!=="undefined") {
document.getElementById("result").innerHTML = "Hey, Your browser supports the Web Storage.";
}
else{
document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage";
}
</script>
</body>
</html>
Category: | Web Tutorial |
Sub Category: | HTML Web Storage API |
Uploaded by: | Admin |
Read Articlehttps://horje.com/learn/1434/reference