I’ve noticed that sometimes when I update my javascript client libraries (under /etc/designs/my_project/clientlibs), the changes are not always automatically reflected when I refresh my webpage to test. One way around this is to clear your browser cache after making a change, but depending on the situation, that might mean logging into either CQ5 again or your even the website you’re working on in order to test the changes.
What I found is that if you make a change to the js.txt file in your client library and save it again, then the changes in the actual javascript file you’re working on are picked up.
For example, I have the following js.txt in my clientlibs_main (cq:ClientLibraryFolder) folder:
#base=/etc/designs/my_project/clientlibs js/my_client_javascript.js
and my actual javascript functions are in the file /etc/designs/my_project/clientlibs/js/my_client_javascript.js. When I make changes in my_client_javascript.js, these aren’t always reflected in the website after saving. But after making my change, if I edit js.txt (I generally delete and re-add the ‘s’ at the end of the line ‘js/my_client_javascript.js’), and save THIS file as well, the changes are reflected in the website without the need for clearing the browser cache.
Pingback: CQ5 Gotchya: Client Libraries Not Automatically Refreshing – Part 2 | Code Monkey