That's good imo but just keep that in mind. I use Chrome as my default browser, but a new instance was launched as opposed to a new tab opening in my current browser. When you do, a new instance of Chrome will pop up. To start testing the platform, simply cordova run browser, or cordova run if you only have one platform. And if you want the latest, then you need to specify cordova platform add Soon that version will be the default, and if you're reading this in the future you should probably just take the default, it could 6.0.0 by now.Īnd obviously, if you are only using the Browser platform to test and you find it isn't working out for you, then be sure to go ahead and remove it: cordova platform rm browser. That means running cordova platform add browser. First, you have to actually add the platform. Working with the Browser Platformīefore you begin working with the Browser platform, there are a few things you should know. Again, this is just my opinion, but to me, the Browser platform is great for testing, but not necessarily something I'd go live with. The camera does work, but it is more of a workaround then what I think a typical end user may expect in a production app. I think the intention of the browser platform is to actually support going to production with your app. Now - here is where my opinion and those of the Cordova group (which technically I'm part of too ) differ a bit. I'll be demonstrating how it does so a bit later, but you can use the same APIs you use on your device within the browser and actually get things done. On the flip side, the Browser platform actually supports the Camera. What do I mean by that? If you simply serve up your www assets, then you won't have a deviceready event (technically, Ionic will fire one for you) and you won't have support for things like the camera or other "device only" features.
It attempts to actually make your application work on the browser. However, the "Browser platform" acts a bit differently. For example, cordova serve and ionic serve.
After seeing an update on the Apache Cordova blog ( Cordova Browser 4.1.0), I thought it might be nice to take another look at it and see how far along it has come.įirst and foremost, what is the point of the browser platform? Speaking for myself, and I'll clarify what that means in a second, I think the browser platform is a way to test your Cordova applications in the browser. Nearly two years ago I first wrote about the Cordova Browser platform ( Browser as a platform for your PhoneGap/Cordova apps).