“Other than elements, HTML 5 also introduces additional
capabilities to the browser like working in offline mode,
multi-threaded JavaScript, etc. Let’s go though some of the
features.“Offline Mode
With HTML 5, you can specify what resources your page will require
and the browser will cache them so that the user can continue to
use the page even if she gets disconnected from the internet. This
wasn’t a problem before AJAX came into existence as the page could
not request for resources after it was loaded. However, today’s
webpages are designed to be sleek so that they load fast and then
the additional resources are fetched asynchronously.“Local Database
HTML 5 has included a local database that will be persistent
through your session. The advantage of this is that you can fetch
the required data and dump it into the local database. The page
there after won’t need to query the server to get and update data.
It will use the local database. Every now and then, the data from
the local database is synced with the server. This reduces the load
on the server and speeds up responsiveness of the application.“Native JSON
JSON, or JavaScript Simple Object Notation is a popular alternative
to XML, which was almost the de-facto standard before the existence
of JSON. Until HTML 5, you needed to include libraries to encode
and decode JSON objects. Now, the JavaScript engine in that ships
with HTML 5 has built-in support for encoding/decoding JSON
objects.“Cross Document Messaging
Another interesting addition to HTML 5 is the ability to perform
messaging between documents of the same site. A good use of this
would be in a blogging tool. In one window, you create your post
and in another window, you can see what the post would look like
without having to refresh the page. When you save the draft of your
post, it immediately updates the view window.”
HTML 5
By
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends, & analysis