Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook
Lesson 1: Introducing web storage CHAPTER 15 559 Therefore, the same host, port, and protocol (for example, HTTP versus HTTPS) m ...
560 CHAPTER 15 Local data with web storage This chapter examines the two types of web storage: localStorage and sessionStorage. ...
Lesson 1: Introducing web storage CHAPTER 15 561 ■■key(index) Method that finds a key at a given index. The World Wide Web Conso ...
562 CHAPTER 15 Local data with web storage Reaching the storage limit If the storage limit is reached, or if the user manually t ...
Lesson 1: Introducing web storage CHAPTER 15 563 sessionStorage has a context that, by design, is extremely confined. It’s limit ...
564 CHAPTER 15 Local data with web storage No transaction support Another benefit of other storage options that is missing from ...
Lesson 2: Handling storage events CHAPTER 15 565 Which of the following URLs can access data stored on http://www.example.com / ...
566 CHAPTER 15 Local data with web storage before that entry was updated in browser tab two. In this scenario, tab one doesn’t k ...
Lesson 2: Handling storage events CHAPTER 15 567 Bubbling and canceling events Unlike some other types of events, the storage ev ...
568 CHAPTER 15 Local data with web storage alert(e.originalEvent.newValue); } $(window).on('storage', respondToChange); if ('ons ...
Practice exercises CHAPTER 15 569 C. An iframe on the same page whose source is within the same domain D. The operating system t ...
570 CHAPTER 15 Local data with web storage <table id="contacts"> <thead> <tr> <th>Email</th> <t ...
Practice exercises CHAPTER 15 571 } body { color: #776E65; padding: 10px; } header { height: 20px; background-repeat: no-repeat; ...
572 CHAPTER 15 Local data with web storage clear: left; display: block; float:left; } #editContact input { width: 150px; padding ...
Practice exercises CHAPTER 15 573 contactsNamespace.initialize(); }); (function () { this.contactsNamespace = this.contactsNames ...
574 CHAPTER 15 Local data with web storage var html = ''; for (var i = 0; i < results.length; i++) { var contact = results[i] ...
Practice exercises CHAPTER 15 575 displayCurrentRecord(); var results = retrieveFromStorage(); bindToGrid(results); }; Add the ...
576 CHAPTER 15 Local data with web storage }); (function () { this.contactsNamespace = this.contactsNamespace || {}; var ns = th ...
Practice exercises CHAPTER 15 577 ns.save = function () { var contact = currentRecord.contact; contact.firstName = $('#firstName ...
578 CHAPTER 15 Local data with web storage Suggested practice exercises The following additional exercises are designed to give ...
«
25
26
27
28
29
30
31
32
33
34
»
Free download pdf