/** * Cache Prevention for Dojo xhr requests * * Adds no-cache header and enables dojo's preventCache feature * for every dojo xhr call. This prevents the caching of partial * refreshs. * * @author Sven Hasselbach * @version 0.3 * **/ dojo.addOnLoad( function(){ if( !dojo._xhr ) dojo._xhr = dojo.xhr; dojo.xhr = function(){ try{ var args = arguments[1]; args["preventCache"] = true; args["headers"] = { "cache-control": "no-cache" }; arguments[1] = args; }catch(e){} dojo._xhr( arguments[0], arguments[1], arguments[2] ); } } )