3 ms·
"As long as there's no way for me to simulate a built-in browser in a web app, HNmobile will remain being a non-standalone app." I'm not sure if you had a look
by sylvinus 15y ago
"As long as there's no way for me to simulate a built-in browser in a web app, HNmobile will remain being a non-standalone app."
I'm not sure if you had a look at it yet but there is a PhoneGap/Cordova plugin called ChildBrowser that may do what you want here. I can help you getting setup with a PhoneGap project for your app if you want!
"Since it's hosted on another domain, the API supports CORS so that HNmobile can do cross-domain XMLHttpRequests."
Why don't you use JSONP?
- enoughalready 15y agoJSONP is considered by most to be a hack and a security risk. CORS is extremely easy to implement, as it only requires you to send some headers to the browser. For example, in a node app I recently wrote, adding CORS was just a matter of adding these lines: var allowCrossDomain = function(req, res, next) { aptUtil.log('using cors to allow for cross domain xhr'); res.header('Access-Control-Allow-Origin', '*'); //any domain can submit requests to us. res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'); res.header('Access-Control-Allow-Headers', 'Content-Type'); next(); }; app.use(allowCrossDomain);