3 Replies Latest reply on Sep 11, 2016 9:54 AM by christopherb35062614

    how to disable auto reload of phonegap desktop

    jakec86659707 Level 1

      hi!

      Im new to phonegap development.

      I just want to ask about disabling auto reload in phonegap using the desktop version. I can not type something on the input field because it keeps on reloading. I tried to search regarding this issue but I only found disabling using the CLI.

       

      Is there any way to disable that functionality without using the CLI or the command line because it seems confusing and hassle.

       

      Your response will be highly appreciated. Thank you.

      If this question is already answered please give me the link. Thank your for your help.

        • 1. Re: how to disable auto reload of phonegap desktop
          christopherb35062614

          The desktop monitors the file structure so if you make a change to the codebase it will auto refresh, I am not aware of a way to disable this.

           

          Not sure what you mean by you can't type something in the input field because the rendered output has nothing to do with the other, it might just be a matter of a delay from the time it takes to refresh after you make a code change to the time it actually refreshes in the test screen/device.

          • 2. Re: how to disable auto reload of phonegap desktop
            jakec86659707 Level 1

            Thanks for the quick respond. Yeah I notice that every time I update my index.html file it will automatically reload to display the current code.However, though you did not update your codes still it keeps on reloading in the background using ajax request I think this is their technique to fetch the new updated code. But I want to disable this behaviour because it makes my phonegap server busy and sometimes crashes the Phonegap desktop. That is why I want to disable this behaviour. I will provide a screen shot regarding with ajax request (autoreload).

             

             

            Thank you

            Phonegap.png

            • 3. Re: how to disable auto reload of phonegap desktop
              christopherb35062614 Level 1

              I know their are flags to the underlying server that can turn off the autoreload but not sure if they are accessible via the desktop build.

               

              Unless I need to test something device specific for phone gap I just turn on iis express (or node.js depending if i am on windows or osx) and then in my code just add a InBrowser() function and add all the device specific stuff to a object so if i am in browser i just set the values manually then I don't have any refresh stuff happening at all... That combined with Chromes dev tools I can enable the device ipad etc. so i can make sure it is doing what I want to "visually" then "if i need to" i will use desktop app otherwise I just zip www and push it to build and use the qr code to install it onto whatever device i need.

               

              On a side note I wouldn't use Opera to develop mobile UI, but rather use Chrome instead as it is more compliant with mobile browsers than Opera is (html/css) and I think you will find it will make your life easier in the long end

               

              But that is just a personal preference