HTML 5 Tutorial Chapter 6 Web Storage. Storing Data on The Client HTML5 offers two new objects for storing data on the client: localStorage - stores data.

Slides:



Advertisements
Similar presentations
Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
Advertisements

Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
More CSS - Page layout + HTML5 new features Boriana Koleva Room: C54
HTML 5 Tutorial Chapter 1 Introduction. What is HTML5? HTML5 will be the new standard for HTML, XHTML, and the HTML DOM. The previous version of HTML.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
Administrative  Philosophy  Class survey  Grading  Proposal (5 points max)  Small projects (10 points each max)  Project (40 points max)  Presentation.
Chapter 10 Managing State Information Using Sessions.
Multiple Tiers in Action
Active Server Pages Chapter 1. Introduction Understand how browsers and servers interacted when the Web was young Understand what early Internet and intranet.
Apache Tomcat Server Typical html Request/Response cycle
Administrative  Philosophy  Class survey  Grading  Project  Presentation.
ASP Cookies Y.-H. Chen International College Ming-Chuan University Fall, 2004.
 A cookie is a piece of text that a Web server can store on a user's hard disk.  Cookie data is simply name-value pairs stored on your hard disk by.
HTML 5 Tutorial Chapter 8 Form Elements. New Form Element HTML5 has several new elements and attributes for forms. New form types : datalist keygen output.
HTML 5 Tutorial Chapter 9 Form Attributes. New Form Attributes HTML5 has several new elements and attributes for forms. New form attributes : autocomplete.
Chapter 25 Utilizing Web Storage.
@ 翁玉礼 HTML5 Discuss. Compare to html4 Canvas Video and audio Local offline store New form control.
CSC 2720 Building Web Applications Cookies, URL-Rewriting, Hidden Fields and Session Management.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
HTML 5 Tutorial Chapter 5 Canvas. Canvas The tag is used to display graphics. The Canvas is a rectangular area we control each and every pixel of it.
 Cookie is small information stored in text file on user’s hard drive by web server.  This information is later used by web browser to retrieve information.
CHAP 6. USING THE HTML5 WEB STORAGE API.  Cookie - Are a built-in way of sending text values back and forth from server to client.  Servers can use.
Cookies Web Browser and Server use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website it is required to maintain.
1 Chapter 9 – Cookies, Sessions, FTP, and More spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science.
COOKIES and SESSIONS. COOKIES A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each.
CSCI 6962: Server-side Design and Programming Java Server Faces Scoping and Session Handling.
HTML 5 Tutorial Chapter 3 Video. Video HTML 5.0 provides a standard for showing video. Using the element we can easily embed video within our web page.
The Problem of State. We will look at… Sometimes web development is just plain weird! Internet / World Wide Web Aspects of their operation The role of.
ECMM6018 Enterprise Networking for Electronic Commerce Tutorial 7
Computer Basics Boot Camp HPCSD Instructional Technology Department.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
Cookies / Sessions Week 10 TCNJ Web 2 Jean Chu. Webpages have no memories.
The basics of knowing the difference CLIENT VS. SERVER.
Web Technologies Lecture 6 State preservation. Motivation How to keep user data while navigating on a website? – Authenticate only once – Store wish list.
8 th Semester, Batch 2008 Department of Computer Science SSUET.
 A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests.
Invitation to Computer Science 6 th Edition Chapter 10 The Tower of Babel.
How Web Database Architectures Work CPS181s April 8, 2003.
Presented By Nanda Kumar(972789) P. Trinesh (982816) Sk. Salma (982824) K. Madhuri (982814) HTML5.
Cookies and Sessions in PHP. Arguments for the setcookie() Function There are several arguments you can use i.e. setcookie(‘name’, ‘value’, expiration,
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
TNPW1 Ing. Jiří Štěpánek.  In current version (XHTML 1.0 strict)  No multimedia elements  No semantics elements  Only few input types  Only few document.
Agenda Steps of App Building The Runtime Environment Managing App Data Debug and Test an App Validate an App Publish an App to a Store Packaging Apps.
THE FUTURE IS HERE: APPLICATION- AWARE CACHING BY ASHOK ANAND.
Some from Chapter 11.9 – “Web” 4 th edition and SY306 Web and Databases for Cyber Operations Cookies and.
Web Storage and Cookies Cookies, Local and Session Storage SoftUni Team Technical Trainers Software University
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
ASP – Web Programming Class  Ravi Anand. ASP – Active Server Pages What is ASP? - Microsoft Technology - Can Run using IIS/PWS/Others - Helps us create.
HTML 5 Tutorial Chapter 7 Input Type. New Input Type HTML5 has several new input types for forms. These new features allow for better input control and.
Development of Internet Applications HTML5 Ing. Jan Janoušek 7.
WEB 237 Week 1 DQ 1 Why is it important to test your web pages in various Web browsers? Explain how XML has impacted HTML. Check this A+ tutorial guideline.
Chapter 17 The Need for HTML 5.
Storing Data.
HTML 5.
Y.-H. Chen International College Ming-Chuan University Fall, 2004
CHAPTER 9 APIS. CHAPTER 9 APIS WHAT IS AN API?
HTML 5 Tutorial Chapter 1 Introduction.
Cookies and Sessions in PHP
PHP / MySQL Introduction
The Application Lifecycle
Unit 27 Web Server Scripting Extended Diploma in ICT
Web Systems Development (CSC-215)
HTML5 and Local Storage.
Web Programming Language
Unit 6 part 6 Test Javascript Test.
HTML5 and Local Storage.
Client-Server Model: Requesting a Web Page
Hypertext Preprocessor
Your computer is the client
Web Application Development Using PHP
Presentation transcript:

HTML 5 Tutorial Chapter 6 Web Storage

Storing Data on The Client HTML5 offers two new objects for storing data on the client: localStorage - stores data with no time limit sessionStorage - stores data for one session Earlier, this was done with cookies. Cookies are not suitable for large amounts of data, because they are passed on by EVERY request to the server, making it 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. The data is stored in different areas for different websites, and a website can only access data stored by itself. HTML5 uses JavaScript to store and access the data.

The localStorage Object The localStorage object stores the data with no time limit. Example : localStorage.lastname="Smith"; document.write(localStorage.lastname);

The localStorage Object The following example counts the number of times a user has visited a page : if (localStorage.pagecount) { localStorage.pagecount=Number(localStorage.pagecount) +1; } else { localStorage.pagecount=1; } document.write("Visits "+ localStorage.pagecount + " time(s).");

The sessionStorage Object The sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window. Example : sessionStorage.lastname="Smith"; document.write(sessionStorage.lastname);

The sessionStorage Object The following example counts the number of times a user has visited a page, in the current session : if (sessionStorage.pagecount) { sessionStorage.pagecount=Number(sessionStorage.pagecount) +1; } else { sessionStorage.pagecount=1; } document.write("Visits "+sessionStorage.pagecount+" time(s) this session.");

Reference 1.Hickson, I. (Eds.). (2011). HTML Living Standar. Retrieved from apps/current-work/multipage/ 2.World Wide Web Consortium. (n.d.). HTML 5 Tutorial. Retrieved from