Tag Archives: HTML5

HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web.

HTML5 Prefetching Api

One common effort done by browser as well as developer is making the browsing experience faster by any means. To achieve this there are several known techniques such as Using CDN (Content Delivery Network), using minified Java Scripts and CSS, using image sprites and even by setting file header for longer caching in .htaccess and so on. There are still thousands of ways, in fact many of them are still unknown. One of all those unknown way is ‘Link Prefetching’.

What is link prefetching?

According to MDN:

Link prefetching is a browser mechanism, which utilizes browser idle time to download or prefetch documents that the user might visit in the near future. A web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache. When the user visits one of the prefetched documents, it can be served up quickly out of the browser’s cache.

That simply means, ask user browser to download next page which user will visit likely after the current page. With this prefetching API you can prefetch content to <link> tag which may be a document, image etc.

How to implement it?

Implementing prefetching API is simple. Just you have to mention rel=”prefetch” or rel=”next” in <link> tag as follow

<!-- full page --> <link rel="prefetch" href="https://ankurm.com/lab/blog/api/using-localhost-for-facebook-app-development/1091/" /> <!-- An image --> <link rel="prefetch" href="https://ankurm.com/wp-content/uploads/2012/03/logo.png" />

Continue reading HTML5 Prefetching Api

HTML 5 DnD Download: A Quick Implementation

So whatever you are, a developer or a user you might know about Drag and Drop Upload. You might have used it on Facebook for uploading photos or in G-Mail for uploading attachments and even on other sites also. Drag and drop is not a new thing, remember how you copy files from your pen drive. What you do is, re-size the window and then you drag required files from desktop to pen-drive or vice-versa. That is nothing but drag and drop. Here on the web, there are many implementations and tutorial are available for creating Drag and Drop upload but there are only few for Drag and Drop Download. Here in this post you will get a quick look on this HTML 5 feature.

So what actually drag and drop download means?

Have you ever tried box.net? f yes then you might know that box allows you to save files to your computer by dragging them from your browser to your desktop. You can even drag the files from you account to printer, in order to print them. You can even drag them into messenger so as to send that file to your friend. As drag and drop upload, Drag and drop download allows you to download any file directly from the internet to required location without doing donkey work of selecting save as from menu and lookup for required folder each time.

Continue reading HTML 5 DnD Download: A Quick Implementation