Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser Cache Vs HTML5 Application Cache

Is HTML5 Application Cache different from browser cache?? If so, in what aspects, it is different and how this mechanism works?? And tell me how using AppCache we can improve browsing performance.. Also discuss about the pros and cons of HTML5 AppCache (its expiry and storage size limit etc.,)??

like image 265
Manikandan Krishnamoorthy Avatar asked Apr 09 '14 09:04

Manikandan Krishnamoorthy


People also ask

What is an important difference between a web cache and a browser cache?

A site cache saves certain types of content and is controlled client-side. A browser cache saves the same types of content, and is saved on your computer, through your browser, and is controlled by the browser.

What is are advantages of application cache?

Application cache gives an application three advantages: Offline browsing - users can use the application when they're offline. Speed - cached resources load faster Reduced server load - the. browser will only download updated/changed resources from the server.

Why would you use the application cache in your Web applications?

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 they're offline.


3 Answers

HTML5 Cache

HTML5 provides application cache, which means that a web application is cached, and accessible without an internet connection. Application cache gives an application three advantages:

  • Offline browsing - users can use the application when they're offline

  • Speed - cached resources load faster Reduced server load - the

  • browser will only download updated/changed resources from the server

Browser cache

Internet browsers use caching to store HTML web pages by storing a copy of visited pages and then using that copy to render when you re-visit that page. If the date on the page is the same date as the previously stored copy, then the computer uses the one on your hard drive rather than re-downloading it from the internet.

References -

  • http://www.w3schools.com/html/html5_app_cache.asp

  • http://www.pctools.com/security-news/what-is-a-browser-cache/

The new HTML5 specification allows browsers to prefetch some or all of a website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site's performance, though you are of course using bandwidth to download those files initially.

like image 135
Lasitha Benaragama Avatar answered Oct 21 '22 10:10

Lasitha Benaragama


AppCache has been deprecated.

See Google's note on it and Mozilla's. Google recommends using the service worker Cache API (which Mozilla classifies as an "experimental technology"). Note: compatibility with Safari is limited.

like image 34
Sherrie Gossett Avatar answered Oct 21 '22 10:10

Sherrie Gossett


Difference

AppCache is specifically designed to allow web apps (and web sites) to be made available offline, though the same speed benefits which the normal browser cache provides, when the user is online, are also provided by AppCache.

The key difference with the Browser cache is that you can specify all the assets the browser should cache in a manifest file (conceivably your entire site) whereas the browser cache will only store the pages (and associated assets) you have actually visited.

like image 2
bajran Avatar answered Oct 21 '22 12:10

bajran