Introducing the HTML5 History API. By Mike Taylor, Chris Mills Introduction Before the advent of HTML5, one thing that we — as web developers — were not able to control and manipulate is the session history of a particular browsing context.
Not without incurring page reloads or relying on location.hash workarounds. This is all set to change however: the HTML5 history API provides a means to perform tasks such as moving forward and backward in the session history, adding new entries into the history, and so on. In this article we'll look at the API's basic syntax along with a simple example to show you what's possible.
Opera 11.50 and later support the complete API, including the pushState() and replaceState() methods, the history.state object, and the popstate event. Basic concepts and syntax The History API relies on a single DOM interface — the History object. History objects represent each tab's session history as a flat, comma-separated list of session history entries.
The basic methods of the history object are: Summary. 7 Lovely Things About HTML5 Markup. Article by Matt Doyle | Published on 12 July 2011 Categories: Discover 7 really nice ways that HTML5 can make your markup easier to write and more powerful.
Covers doctypes, new elements and attributes, flexible linking, markup shortcuts, and more. HTML5 — the latest generation of the Web's markup language — has been creating quite a stir over the last couple of years, as more and more browsers implement the latest and greatest HTML5 features. HTML5 really hit the mainstream in 2010, in part driven by Steve Jobs' open letter, Thoughts on Flash. HTML5 is quite a broad term, encompassing everything from the revised markup specification through to new API features such as audio, video, canvas and geolocation. In this article I'm going to focus on the markup language itself, and look at seven reasons why I love HTML5's markup more than HTML4's. Doctypes data- attributes Some new and improved elements and attributes More flexible linking Simpler markup, and Enhancements to web forms.
For example: Get off(line) Taking your web sites and apps offline with the HTML5 appcache There’s a general (and understandable) belief by even many developers that web sites and web applications can only be used when the browser has a web connection.
Indeed, this is routinely cited as one of the real advantages of “native” apps over web apps. But as unintuitive as it sounds, in almost every modern browser and device (except even for now IE10 developer previews, but here’s hoping that changes), that’s not the case, provided the developer does a little extra work to make their app or site persist when a browser is offline. (Of course the user must have visited your site while their browser did have a connection) In this article, I hope to clear this whole areas up once and for all, show you how to do it, and point to some great resources out there for learning more about creating offline versions of your web sites and apps. HTML5 Canvas autoresize.