It is fast becoming the case that web and windows apps actually have a sliver of a difference between them. I would like to share what I have felt about HTML5 for a while now – that it will change the way we write web apps!
The following features will make HTML5 a great web standard for tomorrow:
Video and Audio:
Steps to use Canvas:
- Declare a canvas tag
- Use canvas context to draw shapes, images and graphics
- Create a Web Worker
- Post a message to the Web Worker
- Handle the notification handler triggered by posting message in #2
For more details, refer to Robert Nyman’s post on web workers.
How about an email client designed in HTML5 with offline caching functionality? This will allow a user to browse through cached emails even when he or she is offline. Loading time will be faster as the data will be fetched from cache. Application Cache in HTML5 is achieved by:
a. Registering the content type of manifest file as “text/cache-manifest”
For Apache, you can use AddType directive “AddType text/cache-manifest .manifest”
You can add “.manifest” MIME Type to Internet Information Server
b. Creating cache manifest file to include/exclude objects that will be cached.
c. Adding manifest attribute in the HTML file
Application cache offers a great amount of flexibility on what can be included / excluded in it. Though there are limitations on the size of data (5mb), this can still be useful feature if you are developing offline apps using HTML5.