Posts

Showing posts with the label HTML5

[HTML5] A Beginner's Guide to Using the Application Cache

Introduction It's becoming increasingly important for web-based applications to be accessible offline. Yes, all browsers can cache pages and resources for long periods if told to do so, but the browser can kick individual items out of the cache at any point to make room for other things. HTML5 addresses some of the annoyances of being offline with the  ApplicationCache  interface. Using the cache interface gives your application three advantages: Offline browsing - users can navigate your full site when they're offline Speed - resources come straight from disk, no trip to the network. Resilience - if your site goes down for "maintenance" (as in, someone accidentally breaks everything), your users will get the offline experience The Application Cache (or AppCache) allows a developer to specify which files the browser should cache and make available to offline users. Your app will load and work correctly, even if the user presses the refresh button while th...

[HTML5] - The !DOCTYPE Tag and Its Effect on Page Rendering

 I never gave much thought to the DOCTYPE tag because my HTML editor always included it in the page template. It wasn't until the arrival of HTML5 that I noticed how much it had changed since version 4. Around the same time, I also noticed that my browser - Internet Explorer 9 (there I said it!) - was switching to "quirks mode" when loading certain pages. Then, a little later, I put two and two together and came to understand that the two were related. In today's article, we'll see how as we learn about the DOCTYPE tag and it's effect on page rendering. What Is the DOCTYPE? The DOCTYPE declaration, which should be the first tag in the source markup of any web page, is utilized by the web browser to identify the version of the markup language in which the page is written. It may contain a link to a Document Type Definition, or DTD for short. The DTD sets out the rules and grammar for that flavor of markup, thus enabling the browser to render the cont...