Copy entire website to iPad - javascript

I've created a website for a client's salesforce to use in hospitals, where they can't use wifi to access the internet as it can interfere with sensitive medical equipment. The website uses HTML, CSS and Javascript and does not require any form of server to work, which is fine when run locally on a laptop. However, they now want to use iPads and I've been trawling the Net for a simple solution in which I could copy the entire site to an iPad, while maintaining the site's directory structure, and then launch it locally with the browser. Nothing that I've found seems to be able to do this, although it seems such a ridiculously straightforward thing.
The best I've been able to do is to email the zipped site to my iPod, and then use the FileManager app to unzip and run the site in its own browser. It's useable but not great (every time you tap something you get an overlay at the top of the page) and there's no way I can find of adding a shortcut to the desktop - is there a better way of doing this?

You can look into something like React Native which allows you to write javascript HTML applications and deploy them as native iOS and Android applications. It shouldn't require too much work to move it over enough to just compile it and run it as you do currently.
https://facebook.github.io/react-native/

Cordova to package it in to an app https://cordova.apache.org/

Related

Is there an HTA-like solution for modern web apps?

I have been developing an app using HTML, CSS, and JS, using the App Mode command line argument for Google Chrome. It works nice, but I would like some ability to use the local file system without manual input from the user. That is, if I want a file accessed directly, I want it automatically done, not requiring the user to load the file in.
One option is to disable web security, which I'm not doing because there is a need to use Google Chrome normally. I haven't been able to use a command line argument to create a separate instance of Chrome, either.
I tried working on an HTA, but any attempt to port the code to HTA ends in headaches. Also, it doesn't seem to enjoy the perks that Blink/Webkit grants.
I looked into Electron and other similar platforms, and it requires installing a handful of things, which is a no-go due to the computer setup.
Are there any solutions with a sort of portable app, that can be dropped in a folder with the HTML document (say, labeled index.html or main.html), and upon opening the browser it directly opens that file without having to configure anything? A sort of barebones chromium-based browser that only opens a single file, allowing use of HTML, JS, CSS, along with local file access? Kind of like HTA but modern?
The good news, is that it does exist, but it's not as "out-of-the-box" as HTA.
My team has migrated from HTA to WebView2.
The overall approach is to build a program with the WebView2 browser (you're basically building your own HTA like browser). Your javascript code can communicate back and forth with the program, which in turn has full access to local resources.
WebView2 is the Microsoft Edge Chromium browser, so you're getting the latest web tech and layouts (a big pain for HTA dev.). The program that contains the WebView2 control has full access to local files, scales, printers (without a pop-up dialog).
The approach has all the benefits of HTA (html / javascript programming, local file access, web based deployment, etc.), plus all layout and other benefits of a modern browser.
The program you'll build is very small, especially compared with the HUGE runtime of similar solutions, like Electron.
Rick Strahl has an excellent article on WebView2, and tips for building the program I'm describing. He has great advice on how to build an installer for it, including "Evergreen", which keeps the WebView2 up-to-date with the latest browser tech.
Microsoft's introduction to the technology here.
https://learn.microsoft.com/en-us/microsoft-edge/webview2/

Node.js Automate Login and Upload

I currently have a node.js script that automatically creates a group of files and then zips them ready for being uploaded on a site. I'm trying to add one extra piece of functionality to the script that will log into the site and upload the file itself.
I've done some reading around and found a lot about headless browsers but not sure if that's the right path to go down as they seem to rely on other applications like chromium and they're focused on testing sites.
Does anyone know where I should start looking?
In my current project I am using the following library from Google, puppeteer. I personally found it to be very easy to use, and it even provides access to the dev protocol that Google Chrome has.
I've done some reading around and found a lot about headless browsers but not sure if that's the right path to go down as they seem to rely on other applications like chromium and they're focused on testing sites.
Yes, they are often used for testing, to assure that the correct things are rendered on screen etc. However, in many scenarios, like yours, the use of a headless browser to interact with a website is totally legit in a non-testing scenario.

Can a web application be converted to a google chrome application?

We have a very simple digital signage application that loads six web pages and rotates through them in an iframe.
We thought we would like to take this application and run in kiosk mode as a chromium app. However, simply using the HTML in the page has thrown all kinds of errors for the app. The most consistent on is the illegal use of external images, css, and fonts as well as complaints about javascript libraries, etc.
It looks as though it will be extremely painful to try to make this into a kiosk app.
Is it possible to make this type of conversion?
Does anyone have advice as to how to proceed?
Can you pull in external pages into a Chromium app?
You cannot run Javascript on a browser via local filesystem for security reasons. But what you could do is package the web app as a local app.
One option is to use Windows HTML Application (HTA)
http://en.wikipedia.org/wiki/HTML_Application
But this requires Internet Explorer to run.
Another option that sounds great is using Node Webkit. I have never done it before, but seems very powerful.
https://www.npmjs.com/package/nodewebkit
You can write a powerful Javascript app and run it locally this way.
UPDATE
Official Node Webkit website:
http://nwjs.io/

Deploying Web APP (Client side) as Desktop Client

i am looking for an option to fully deploy the client side AJAX app written in js using qooxdoo framework.All view logic stays at Qooxdoo JavaScript framework. But i want to deploy it as desktop client too.
It already hosted on server and working fine but just to avoid Download time (JavaScript alone is 2 MB ) i also want to distribute as desktop client.
what i am looking for are :
Should work in Mac , Linux, and Windows and possibly android
Browser controls are unnecessary (location bar etc)
Should be able to run eval coz qooxdoo use eval selectively which make adobe air unable to work .
I know how to do in Xulrunner but I would prefer to do host it inside google chrome. I also finding a way to bundle xulrunner in portable way (is that already portable?can just download and run directly?)
EDIT: I looked Prism and its promising but is there anyway to bundle Client Side Web Content in a web bundle for Prism ? From its descrpition on Mozilla Wiki , we can't do that.
node-webkit looks like a viable option for packaging the entire application. I haven't used it and have only recently found out about it.
Appcelerator is an option, however there are some restrictions when using it. Some have successfully used the qx-oo (just the OO layer) with Appcelerator. Search "qooxdoo appcelerator" for more information. There may be issues when using it with the qooxdoo UI layer (which is likely the whole point of your using qooxdoo.
Lastly, one "low tech" option might be to save the web page to your local computer via your web browser and then re-distribute those saved files as the "app." I'd expect lots of problems with this, though. For example, if you're dynamically loading different components in qooxdoo these scripts might not be saved. It's easy enough to try, though.

Developing a cross-platform self-contained HTML application

I am thinking of building an application, kind of like TiddlyWiki in the sense that everything is self-contained in an HTML file, or at least in a bundle where a user won't have to install anything. It works on just about any browser, and on mobile phones (Android and iPhone), and in some browsers (e.g. Firefox), manages to save to the local filesystem without a plugin (albeit, it launches many security warnings, but there are other solutions for that). Other browsers happen to use a Java plugin to bypass this restriction.
Are there any technologies that exist that make this possible? HTML5's web storage sounds like it would be almost perfect, except that the data would be tied to the browser.
Any assistance would be appreciated (even if that just means editting / retagging the question to get more folks looking).
Whats about the fileapi: http://caniuse.com/#search=fileapi
I am just adding a relevant comment with this but not exactly an answer...
When you are saying that you want to develop application which contains everything... Then I would like to add about Titanium, PhoneGap, and others (Corona)...
This softwares provides JavaScript base which will be running on all the mobiles (if mobile applications), desktops (if desktop applications) and so on.... But Titanium (as i am working on it) works on the SDK of all the other languages for development...
Now TiddlyWiki, what i have understood from the link is that it is creating a web application or something like that which will work on all the other mobile devices. But this is NOT Good always, Since some application needs to be a NATIVE environment (which is supported by Titanium). Native applications will be much more faster than any other developed applications..

Categories

Resources