For this sake, W3.Org introduced you with offline applications, which are not all applications (IMO) but are just pages that allow you to stay active and keep staring at the "No internet connection, try again once connected". In old applications, once you would load the resource the browser would view a page "Not connected" (or same) in now a days, the web page is maintained, but the message is same.
Here are a few links that you need to see before diving in the offline world.
https://developer.mozilla.org/en-US/Apps/Build/Offline[
^]
http://www.w3.org/TR/offline-webapps/[
^]
http://diveintohtml5.info/offline.html[
^]
http://www.html5rocks.com/en/features/offline[
^]
The main logic behind these offline applications is that they try to connect to the internet, asynchronously, holding tightly to the browser. If resource is found, then you are connected to the internet, if there was a
timeout or
error then the resource was not found and
you are offline. That is the logic behind these offline applications.
Remember, browser doesn't allow websites to communicate with the machine because it might expose the machine to a malicious website. Also, in such cases you should consider using localStorage to store the data that your user would want in case he is offline. You can store the required binaries and assemblies when he is online, so that he can use them when he is offline.
If that helps you to make sure that application runs while offline.