cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wolf <>
Subject Re: Serve vs. opening an HTML file in the browser
Date Mon, 12 Aug 2013 19:50:37 GMT
This is how we are using itÅ  as a local server for remote devices to then
attach for example chrome remote debugging.


On 8/6/13 10:20 AM, "Michal Mocny" <> wrote:

>file:// urls come with a lot of restrictions in chrome in desktop, but
>isn't the intended use case anyway.
>The intended purpose was to load the web assets from a mobile device
>instead of loading the bundled versions, so as to get rapid edit-refresh
>when not making changes to native bits.  As Andrew points out 'serve'
>command will 'prepare' whenever necessary (grunt watch?) and also serve up
>files via local web server.
>The simple local alternative may be to just use your own local web server
>from the top level www/ dir, thus avoiding the need to prepare -- but it
>only works if and only if you do not use merges/, and none of your plugins
>have web assets (js-modules are fine I think?), which is not usually the
>On Tue, Aug 6, 2013 at 9:53 AM, Andrew Grieve <>
>> One of the original motivations for "cordova serve" was for it to watch
>> changes and automatically run "prepare" for you. I don't think this is
>> working right now though.
>> On Fri, Aug 2, 2013 at 4:23 PM, Anis KADRI <> wrote:
>> > XHRs won't work by default on certain browsers such as Chrome. I don't
>> > think there are any other benefits.
>> > This restriction does not exist on a device.
>> >
>> > On Fri, Aug 2, 2013 at 1:13 PM, John M. Wargo <>
>> wrote:
>> > > Can someone help me understand why I would want to use cordova serve
>> > rather
>> > > than just loading the web content in the browser directly (through
>> File -
>> > > Open for example)?
>> > >
>> > > Is there something special that serve does that makes this approach
>> > better?
>> >

View raw message