Instant HTML5 Local Storage How-to (即時 HTML5 本地儲存實用指南)

Alex Libby

  • 出版商: Packt Publishing
  • 出版日期: 2013-03-24
  • 售價: $1,000
  • 貴賓價: 9.5$950
  • 語言: 英文
  • 頁數: 80
  • 裝訂: Paperback
  • ISBN: 1849699313
  • ISBN-13: 9781849699310
  • 相關分類: HTML
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

Over 15 recipes to take advantage of the HTML5 Local Storage standard.

Overview

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results.
  • Learn the basics of how to use the LocalStorage standard, and view the results in your browser
  • Learn how to detect when you can use LocalStorage, or when to fall back to using cookies, as well as how to convert an existing site to use LocalStorage
  • Using LocalStorage to store images, arrays, and objects for use in your site

In Detail

The use of cookies to store information in a browser has been around for over a decade; its simplicity has led to its use in a variety of applications, such as online shopping baskets, but which has also lead to some inherent drawbacks in terms of security and use. HTML5 LocalStorage brings much needed additional functionality to your browser, allowing you to store more useful information that you can later reference in your websites.

"Instant HTML5 Local Storage How-to" is a practical, hands-on guide that provides you with a number of clear step-by-step exercises, which will help you take advantage of the power of the LocalStorage standard, and give you a good grounding in incorporating it into current or future website projects.

This book looks at how you can incorporate the HTML5 LocalStorage standard into your websites, using the power of modern browsers to store useful information that can be referenced at any time without recourse to the server.

You will also learn how to test for browser capability, and when the browser platform being used requires that you fall back to using cookies. We will also take a look at how you can store more relevant content, such as images or content from arrays, even though the normal standard requires content to be stored in string format. You will also learn how you can make content available offline using application caching, as well as how to incorporate LocalStorage into a plugin using jQuery that you can then incorporate into your sites in the future.

We will also look at some real-life examples, where "Instant HTML5 Local Storage How-to" will take you through how you could incorporate LocalStorage into your sites; we’ll take a look at code you can simply add to a site, or use as a development platform for your own future projects.

What you will learn from this book

  • Basic usage of HTML5 Storage, including its limitations and security
  • Viewing localStorage content in my browser
  • Building a basic demo using session and local storage
  • Adding detection to a site to determine when you can use LocalStorage
  • Implementing application caching, with checks to determine online status
  • Using web storage instead of cookies
  • Building a simple plugin using jQuery
  • Adding objects, arrays, images, and TTL support to storage
  • Adjusting local storage space for browsers

Approach

Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks. Get the job done and learn as you go. Step-by-step recipes to get to grips with the LocalStorage standard.

商品描述(中文翻譯)

超過15個利用HTML5本地儲存標準的食譜。

概述:
- 在瞬間學到新知識!一本短小、快速、專注的指南,立即獲得成果。
- 學習如何使用LocalStorage標準的基礎知識,並在瀏覽器中查看結果。
- 學習如何檢測何時可以使用LocalStorage,或者何時需要回退到使用cookies,以及如何將現有網站轉換為使用LocalStorage。
- 使用LocalStorage儲存圖片、陣列和物件,供網站使用。

詳細內容:
使用cookies在瀏覽器中儲存資訊已經存在超過十年;它的簡單性導致它在各種應用中被使用,例如網上購物籃,但這也帶來了一些安全和使用方面的固有缺點。HTML5 LocalStorage為您的瀏覽器帶來了非常需要的額外功能,允許您儲存更有用的資訊,以便稍後在您的網站中引用。

《即時HTML5本地儲存實作指南》是一本實用的、實踐性的指南,提供了一系列清晰的逐步練習,幫助您充分利用LocalStorage標準的功能,並為當前或未來的網站項目提供良好的基礎。

本書介紹了如何將HTML5 LocalStorage標準融入您的網站,利用現代瀏覽器的功能,在不需要伺服器的情況下儲存有用的資訊,隨時引用。

您還將學習如何測試瀏覽器的功能,以及當使用的瀏覽器平台需要回退到使用cookies時的處理方式。我們還將研究如何儲存更多相關內容,例如圖片或陣列中的內容,即使正常標準要求內容以字串格式儲存。您還將學習如何使用應用程式快取使內容離線可用,以及如何使用jQuery將LocalStorage融入插件,然後將其用於未來的網站。

我們還將查看一些實際示例,其中《即時HTML5本地儲存實作指南》將帶您了解如何將LocalStorage融入您的網站;我們將查看您可以簡單添加到網站或用作自己未來項目的開發平台的程式碼。

本書將教您:
- 使用HTML5儲存的基本用法,包括其限制和安全性。
- 在瀏覽器中查看LocalStorage的內容。
- 建立一個使用session和local storage的基本示範。
- 在網站中添加檢測,以確定何時可以使用LocalStorage。
- 實現應用程式快取,並檢查在線狀態。
- 使用Web Storage代替cookies。
- 使用jQuery建立一個簡單的插件。
- 將物件、陣列、圖片和TTL支援添加到儲存中。
- 調整瀏覽器的本地儲存空間。

這本書充滿了實用的、逐步的指示和清晰的解釋,讓您完成工作的同時學習。逐步的食譜,讓您掌握LocalStorage標準。