reliable refresh of js resources in Grails - dev env

... is there a reliable way to refresh JavaScript resources in Grails app short of cleaning and restarting it? I've noticed that sometimes it can take a while for some changes to refresh when working ajax calls.

For instance:

$.ajax({
    type    : thisType,
    url     : thisUrl,
    data    : thisData,
    statusCode :  {
        200 : function(){
                console.clear();
                console.log( 'status code 200');
        },
        401 : function(){
                console.clear();
                console.log('log in to continue');
        }

... omitted stuff ...

}); 

I'd get the expected console output when status code was 200, but not when I expected 401. A while later stated getting the expected 401 output and so on with other codes.

Is this indicative of issue with browser cache? I'm using Chrome, Grails 2.0.2,jQuery 1.6 and latest distro of IntelliJ

Answers


In my personal experience, it's most of the time the browser cache. When I use chrome to test my webapps I usually disable the cache by going to settings under Web Tools on the lower right corner and then clicking on Disable cache.

Apart from that my web apps refresh their resources quite quickly and I only find problems when I modify layouts that usually force me to restart the dev server.


Need Your Help

Oracle Stored procedure to insert non-duplicate values and foreign key constraint consideration

oracle plsql foreign-key-relationship pls-00103

My requirement is to write a procedure to add values in COUNTRIES table. But, first it should check if corresponding values exist in another table, REGIONS as it is a foreign key. Only if the values

How can I get case-sensitive return from array_intersect()

php arrays array-intersect

I have two arrays and I need to compare that and return matched value from array1. Please refer my code below,