3 ms·
For fastest time to market, optimize the HTML/CSS/JavaScript to display well in a mobile browser. Detect if they are coming from mobile (requests headers like t
by andrewljohnson 13y ago
For fastest time to market, optimize the HTML/CSS/JavaScript to display well in a mobile browser. Detect if they are coming from mobile (requests headers like the user-agent tell you, or just optimize on screen size), and send down mobile pages. Many websites are designed with this in mind from the beginning, and services like Weebly and WPEngine will provide this in their form-built websites.
Otherwise, if your back-end has a usable API, then something like PhoneGap will be faster than writing a native Android/Java app.
Our marketing website takes the first approach, for our core app we write native Java.
- slaxman 13y agoThanks! We already do serve mobile optimized content. I will checkout Phonegap for creating the app. Would it allow me to store data locally?
- andrewljohnson 13y agoLooks like it does: http://docs.phonegap.com/en/3.1.0/cordova_storage_storage.md.html#Storage http://docs.phonegap.com/en/3.1.0/cordova_storage_storage.md...
- okpatil 13y agoPhonegap seems to be a nice idea. But how do you implement CORS for such app ?
- benologist 13y agoDo you need to? It's not website-to-website communication. If you do need to it's very simple, your web server has to include some extra headers: "Access-Control-Allow-Origin", "*" "Access-Control-Allow-Methods", "GET,POST" // etc "Access-Control-Allow-Headers", "X-Requested-With,Content-Type"
- okpatil 13y agoIt seems that I need to. When I don't, it gives "Origin null is not allowed by Access-Control-Allow-Origin" error.