Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. Client-Side Data Storage Hacks > Hack 56. Cache Media Resources Locally with...

Hack 56. Cache Media Resources Locally with the FileSystem API

With the FileSystem API, you can provide your browser with a sandbox where data (both textual and binary) can be read and written.

This hack was contributed by Raymond Camden, a senior developer evangelist for Adobe Systems Inc.

One of the more powerful features coming soon to a browser near you is the ability to read and write to the local filesystem. You can find the “File API: Directories and System” working draft on the W3C website.

Dubbed the FileSystem API, it provides the browser a safe little sandbox where data (both textual and binary) can be read and written. Many excellent articles out there detail the API. This hack assumes you have at least a familiarity with the basics. With that assumption, we’re going to look at a real-world scenario where browser filesystem access can be useful: the local caching of media resources.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint