bestwebdesign

Freelancign web design and Graphics design

Tuesday 5 December 2017

HTML Web Storage

HTML5 Web Storage

What is HTML Web Storage?(Wright-bestwebdesign)

 With web storage, web applications can store data locally inside the customer's program.

Before HTML5, application data must be secured in treats, consolidated into every server request. Web storage is more secure, and a considerable measure of data can be secured locally, without affecting website execution.
Not in the slightest degree like treats, quite far will be far greater (no under 5MB) and information is never traded to the server.
Web storage is per beginning stage (per space and tradition). All pages, from one beginning stage, can store and access comparative data

Browser Support

The localStorage Object

Example

// StorelocalStorage.setItem("lastname", "Smith");
// Retrieve document.getElementById("result").innerHTML = localStorage.getItem("lastname");
Yourself Try

The sessionStorage Object

Example

if (sessionStorage.clickcount) {
    sessionStorage.clickcount = Number(sessionStorage.clickcount) + 1;
} else {
    sessionStorage.clickcount = 1;
}
document.getElementById("result").innerHTML = "You have clicked the button " +
sessionStorage.clickcount + " time(s) in this session.";
Yourself Try



Wright © bestwebdesign and Graphics design

Share:

0 comments:

Post a Comment


Web Design Tutorial

Theme Support

Munere veritus fierent cu sed, congue altera mea te, ex clita eripuit evertitur duo. Legendos tractatos honestatis ad mel. Legendos tractatos honestatis ad mel. , click here →