Cookies vs local storage vs session storage
How do I make an cookies vs local storage vs session storage?
What is a cookies vs local storage vs session storage? How do you make a cookies vs local storage vs session storage? This script and codes were developed by Beau Carnes on 13 September 2022, Tuesday.
Cookies vs local storage vs session storage - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>cookies vs local storage vs session storage</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <h1 class="text-center">Cookies vs. Local Storage vs. Session Storage</h1>
<table class="table table-striped"> <thead class="thead-inverse"> <tr> <th></th> <th>Cookies</th> <th>Local Storage</th> <th>Session Storage</th> </tr> </thead> <tbody> <tr> <th scope="row">Capacity</th> <td>4kb</td> <td>10mb</td> <td>5mb</td> </tr> <tr> <th scope="row">Browsers</th> <td>HTML4 / HTML 5</td> <td>HTML 5</td> <td>HTML 5</td> </tr> <tr> <th scope="row">Accessible from</th> <td>Any window</td> <td>Any window</td> <td>Same tab</td> </tr> <tr> <th scope="row">Expires</th> <td>Manually set</td> <td>Never</td> <td>On tab close</td> </tr> <tr> <th scope="row">Storage Location</th> <td>Browser and server</td> <td>Browser only</td> <td>Browser only</td> </tr> <tr> <th scope="row">Sent with requests</th> <td>Yes</td> <td>No</td> <td>No</td> </tr> </tbody>
</table> </div> <script src="js/index.js"></script>
</body>
</html>
Cookies vs local storage vs session storage - Script Codes CSS Codes
.table { margin-top: 10px; box-shadow: 0px 0px 3px 5px purple;
}
table { background: white;
}
body { background: plum ;
}
Cookies vs local storage vs session storage - Script Codes JS Codes
/* cookies vs local storage vs session storage */
localStorage.setItem('lunch', 'cereal');
console.log(localStorage.getItem('breakfast'));
localStorage.removeItem('lunch');
localStorage.clear();
document.cookie = "hello=true";
document.cookie = "doSomethingOnlyOnce=true; expires=Fri, 31 Dec 9999 23:59:59 GMT";
document.cookie = "person=beau; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/"
document.cookie = "person=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
console.log(document.cookie)
Developer | Beau Carnes |
Username | beaucarnes |
Uploaded | September 13, 2022 |
Rating | 3 |
Size | 2,167 Kb |
Views | 52,624 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
String Methods | 1,672 Kb |
Data Types | 1,807 Kb |
DOM Events | 2,040 Kb |
Stacks | 1,778 Kb |
Recipe Box | 5,955 Kb |
Common Array Methods | 1,490 Kb |
Notifications | 1,672 Kb |
Internet Dungeon Game | 12,502 Kb |
A Pen by Beau Carnes | 2,118 Kb |
Heaps | 1,976 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Minimelephant | Smashlee | 2,507 Kb |
Amazing CSS Menu with Notification Badges | Faizanasad | 2,549 Kb |
A Pen by tugce | Ecgutcnkr | 4,197 Kb |
Week7 replicate | Hwcasis | 1,620 Kb |
Polygon Dodecahedron in CSS | Vennsoh | 7,606 Kb |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 Kb |
Perforated foil | 0x04 | 2,617 Kb |
Arrow Navigation | Hinducows | 1,973 Kb |
Sort the Knowlege | Eprouver | 3,915 Kb |
Tic Tac Toe | Volv | 4,862 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!