Most of my custom modules use external javascript files
I have had an issue that if I change these files they stay cached in the browser so I have to get my users to clear their cache before the changes take effect
I now have a solution
Originally my code i editviewdefs.php was
I have replaced this withCode:'includes' => array ( 0 => array ( 'file' => 'custom/include/ivy/ivy.js', ), ),
This forces the browser to reload the cache every time to js files modified date changesCode:'maxColumns' => '2', 'javascript' => '<script src="custom/include/ivy/ivy.js?time= ' . filemtime('custom/include/ivy/ivy.js') . '"></script>',
Because Sugar also caches files you have to do a repair after you modify the js file to make it work
I hope this is useful to some of you


LinkBack URL
About LinkBacks




Reply With Quote
Bookmarks