Issue with code.js not updating


Seen this mentioned in other posts but is causing a real problem for me.

I have just moved from V5 (where I did not have this issue) to V6 where issue happens all the time.

Basically the deploy process works and the code.js is uploaded to server. However the app does not update properly unless the browser cache (windows and android) is cleared manually. As I said this did not seem to be an issue in V5 where IIRC the JS was not in a separate file.

APart from adding confusion to the compile/debug cycle, it is also likely to be an end user issue as it is not realistic for many end users to either understand why or be able to clear browser cache manually.

V5 seemed to be rock solid in this respect with no caching issues noticed.


V6 is rock solid in this as well.

What do you have in your project’s manifestFile setting?


Thanks for the quick response. manifestFile set to appcache at present


I’ve had this same issue for a long time. It happens regularly, I’d say at least twice a week. I do a lot of deploys both F6 and F7. My development team has also had to clear the cache (we all use latest Chrome on PCs) sometimes to get the code.js to take. The next time it happens I’ll try a full deploy to see if that works but I think I already tried that and it did not. I’d say this is a pretty serious issue at this time.

Thanks, John


JohnC, is this happening only when you deploy to your own server? What happens if you deploy to Volt?

The problem might be something to do with your server.


ristone, are you deploying to your own server or Volt?


I am deploying to my own server. Server configuration not changed since I moved from V5 to V6. Deployment check passes OK.


To my own server. Suspect it started with V6 also.


I will add my ‘me too’. I deploy to my own server and need to clear the Chrome cache frequently.


We’re checking to see if we can find anything. Changes to the browsers could also affect this.

Have any of you tested again Volt to see if you can get the same thing to happen?

Are you using ftp or sftp to upload?


I’m using ftp. I cannot realistically run my apps on Volt due to php issues. In addition the problem with the code.js not updating is not consistent. I might have to deploy with tests hundreds of times before this occurs again.


Like John, I use a lot of php and a MySQL database - so Volt is out. I consider this a Chrome issue rather than an AppStudio issue. It seems to only be a problem with frequent deploys when debugging. When I make a change in code and don’t see it in the running app, I know it is time to clear the cache. Sometimes I also have to close Chrome and restart. Annoying, but manageable.


I used to have this sort of problem on my server a lot, but not anymore. I added the following code to an .htaccess file in my root folder on the server:

# BEGIN Caching
<ifmodule mod_headers.c>
Header set Cache-Control "max-age=0, public, must-revalidate"
# END Caching

Kind regards,


I’ll give this a try but it will probably be some time before I know the results. Note that I added triple tildes around the code so it appear in full below.

Thanks, John

# BEGIN Caching
<ifmodule mod_headers.c>
Header set Cache-Control "max-age=0, public, must-revalidate"
# END Caching


Triple tildes? Yes, that looks much better. Excellent tip, thank you.


Had this issue as well with code.js not updating and discovered I had duplicate functions. One function was in the Project Properties/Global Code. The other was in the Form code. Code.js was picking up the Global function call (the older code).

In my case, it was definitely an error between the chair and the keyboard. :confused:


I’ve had this happen so it is important not to create functions with the same name. The code.js not updating is different so I added a version number to the start up form that was set in Sub Main. I would make changes to forms which were apparent when running the app but the version number would not change. So the updating was getting the new index.html but not the code.js.

Since adding the commands to .htacess suggested by Doug I have not needed to clear the cache. I am running my apps from a Unix server. I don’t know if this is an issue with Windows servers as well. But if so maybe there is a similar solution.



I found this also with Volt not updating code.js. I cured it simply by rebooting my Win7 computer (this was about 2 hours ago, so if something happened to Volt thereabout, pls advise).

I am thus adding this to shed light on the issue as my PC was working just fine at the time… And yet, whilst both Deploy to Volt and Refresh Deploy to Volt caused my volt app to display “Updating - please wait..”, volt returned old, unchanged code.js. (Apart from this, all seemed fine, was able to access my volt data etc, even form layout was updating after a deploy, and I also noted the volt dashboard reflected my latest update time).

Before rebooting, I tried deleting all my cookie caches and restarting chrome & nsb IDE, also modifying code to ensure it was different. I inspected the code.js file generated on my pc in my project folder and it was correct. However, I could see on my chrome debugger that the server still had an old code.js. Curiously, as said, if I change form layouts etc, this WAS still reflected on the server updates.

And yet a full PC reboot cured it. So is there perhaps some kind of driver lockup that occurs – apparently on my pc – where it just stops sending code.js to the server? (I see NSB uses Apache on my local PC, could that be the issue?) Hope that helps.


The forms appear correct because they are in index.html and that is getting deployed correctly. If this happens to you again try clearing the cache in chrome, exit the tab running your app and then exit chrome and restart it, then restart your app. You will then have to do another F7 or F6 of your app and then refresh the app in Chrome. This was the procedure I used and it always worked without having to reboot my PC.

I’m still not having this problem since making the change to .htaccess on my Unix server. If Volt is running on a Windows server something different might need to to be done, but not sure what.



Thanks John. I certainly exited tabs and chrome, and indeed deleted the “Application Caches” for my app’s site (this is under cookies in chrome, and points to, followed by F6’s etc. However, I didn’t do a complete Chrome cache flush mainly as it is inconvenient (my other sites log me out etc). I may try that next time as it would prove a point, but then a reboot doesn’t take long … : ). I have a hunch it’s not that, but something like Apache…