Plain Html and javascript execution offline - html

Can HTML and javascript run offline like an application? I'm looking to running the webpage offline like silverlight OOB applications. But if the browser closes, I want some way to run the webpage again without going online. Is this possible?

The HTML 5 draft introduces mechanisms for a webpage to be used as an offline application although, obviously, as a recent draft spec this isn't supported by all browsers.
You can also File > Save As and just save an HTML file and its associated JS locally.

Google Gears provides the kind of functionality that you're looking for. Google themselves are planning on phasing it out in favour of HTML5's draft (see David's response) but I think you will find Gears more mature [for the time being, at least], and (perhaps importantly, if you're considering redistribution) more consistent across different browsers.
[Further edit:] The Adobe AIR runtime allows you to run HTML and JavaScript applications on the desktop.

Related

Replace WebBrowser control in VS2019 with Mozilla browser control (v1.7.12)

I have looked at numerous posts that discuss embedding the Mozilla browser control in a VB.NET app, however they were all written many years ago and are incomplete, like: How to create simple browser with Mozilla ActiveX Control with VB.NET?.
I was able to have a little success (display an HTML file with CSS3 and JavaScript) by embedding cefSharp into my VB.NET app, but cefSharp adds hundreds of MB. One of the posts said they believed that the Mozilla browser control (v1.7.12) was an exact replacement for the VS 2019 .Net web browser control, but there was no information on how to make the switch. Please advise if the Mozilla browser control is a good alternative, and if so, point to a tutorial or other information for making it work...or is there another choice?
You must use 3rd party library for this. You can use either GeckoFx for Firefox engine, or CefSharp for Chrome engine.

more insights on how PWA works

might be very basic question but just wanted to clear out my doubt, since I'm seeing PWA is like alternative for native application.
What if browser fail to read/understand manifest file?
what if user is having other/older browser? (most of the time I see e.g of chrome)
after installation what are the browser dependencies for PWA?
Please guide me with the above.
Thanks
One of the more important concepts in a PWA is that it is built following the principle of progressive enhancement, this means that the website would function ordinarily on older browsers (including Safari) and then gain PWA abilities if the user's browser supports them.
Therefore in answer to your three questions:
Website would function as normal without the option to "Add to HomeScreen"
Same.
The PWA runs using the browser, therefore any functionality supported by the browser will be included in your PWA.

Is the "Offline browsing " a new feature in HTML-5

:::UPDATED:::
i am reading about HTML-5 and what are the new features it offers, and one of these features are the App Cache which is define in W3school website as "Offline browsing - users can use the application when they're offline",,.
But is this really a new feature in HTML-5 that was not avilable in earlier HTML versions?? since from long time (at least 6 years back) we have the option of browsing a web site even if we are offline since the HTML will be cached inside the browser ?? so what is meant by offline browsing in HTML-5??
BR
Yes, this is new functionality introduced with HTML5. This is not the same as your browser caching the site, such as the ole "save for offline use" option.
Some browsers offline caching mechanisms are simply just unreliable. HTML5 instead uses a manifest file to tell the browser what it should use for offline storage.
See:
http://www.html5rocks.com/en/tutorials/appcache/beginner/
And the w3c working draft:
http://www.w3.org/TR/html5/offline.html
My favourite HTML5 resource (more regarding correct usage of older elements, and how to use the new ones): http://html5doctor.com/
Lastly, as many experienced web developers will tell you, w3schools is trouble. They're infamous for having all kinds of misleading and false information. See http://w3fools.com/
Hope this helps.

HTML5 API aware (auto-suggest/code-assist) JavaScript Editor/IDE

I am aware of HTML5 specifications like WebStorage, IndexedDB API etc are still in progress. However, does anyone aware of good JavaScript editor that is aware of HTML5 API and can provide good auto-suggest/code-assist. I have tried Eclipse HTML Web Editor, it does auto-suggest some but not all (e.g. window.sessionStorage but not window.localStorage, window.indexedDB etc). Aptana Studio 3 recognizes less than Eclipse HTML Web Editor. I prefer Eclipse based as I am working on Java environment (will only try VS 11 as last resource).
Note: I am not looking for WYSIWYG/visual HTML5 tags editor.

HTML5 - Read the Clipboard?

Is it possible with HTML 5 to read the clipboard (without using Java)?
Perhaps the HTML5 Core spec doesn't provide an API for accessing the clipboard, but one of the APIs in the HTML5 family of APIs does. It's called "Clipboard API and Events," and its currently (as of July 2011) a Working Draft. You can find the spec here:
http://www.w3.org/TR/clipboard-apis/
As for implementations, well, I couldn't find one just yet.
Update: As of Dec 2012, this API is still a working draft (dated Feb 2012). There still do not appear to be any working implementations, just a Flash-based workaround for text.
Yes you can use pure JavaScript for this, assuming a modern browser that implements the Clipboard API such as Google Chrome.Chrome Frame is available for IE support and I assume that Firefox will implement the Clipboard API fairly soon. You can only read clipboard data from paste events (such as Ctrl+V), but from that you can read binary data such as image data.
HTML Clipboard API jQuery Plugin and demo. This demo requires the Chrome browser.
No, there is no built-in API for accessing the clipboard. BUT you can use https://github.com/mojombo/clippy for accessing the clipboard. It's flash not Java, so it should be ok for you to use. The advantage is it works across all flash-capable browsers.