Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable phonegap autoreload (At least during dev)

Here is my issue:

I've installed phonegap and phonegap desktop. http://code.riffzone.net/phonegap-install-msw/

Now, when I'm working on my application (Jquery Mobile), I'm testing it on a browser, but the application is reloading again and again after every 2 seconds and I can't even write something in the form input, reloading to fast..

I don't understand where this is coming from?

Here is the screen shot of my browser and the firebug console where you can see the page reloading over and over (1) and the api_auto_reload in the console (2).

image

Thanks a lot :)

like image 692
Romain Derie Avatar asked Feb 08 '15 19:02

Romain Derie


2 Answers

The reload should be triggered only when some of your source files is changed. For some reason it does detect change on your files constantly. That reason is quite hard to find out without debugging more. You can, though, turn the auto reload off with --no-autoreload switch for phonegap serve like this

phonegap serve --no-autoreload
like image 157
Roope Hakulinen Avatar answered Oct 19 '22 14:10

Roope Hakulinen


It was phonegap desktop beta (the minimalist server) and not phonegap (command line) which was causing this bug.

If you have the same issue, make sure you are not using it.

like image 23
Romain Derie Avatar answered Oct 19 '22 12:10

Romain Derie