I can find .js file, such as '/share/res/components/documentlibrary/documentlist_7a2cddfa85f47a8aabe35c5523cc4eec.js', from firefox, but only searched /webapps/share/components/documentlibrary/documentlist.js in server side.
Why?
I want to insert some debug info into documentlist.js, such as console.log("some info").
All the source files have an MD5 checksum appended to them. This is done to avoid the problem of stale browser caches. Resources can be cached forever in the knowledge that if they are updated (eg by hot fix or upgrade) then a new version will be requested. So you can update documentlist.js and the MD5 checksum will be updated and a new file will be downloaded.
The way I found it to work is to: 1. Make changes to the file 2. Click on "Clear dependency caches" here: http://127.0.0.1:8080/share/page/index 3. It's fresh.
Before I learned about that bit, I had to restart alfresco each time, which was pretty lame and slow.
The reason for this additional step is that Surf is caching dependencies more aggressively than before. There are many different possible locations that Surf is able to retrieve a resource from (more than in a standard web app) and it also minifies resources dynamically and this is cached to save repeatedly hunting for resources. The clear dependency caches button resets the cached information. Whilst this is adds an extra step when developing it is beneficial in production systems.
Yeah, I agree. The process is better then before, I'd say. On 3.4c, I would symlink a file.js and file-min.js while developing, then when moving to production, minify the script, then you have to make a fix and back to beginning, which takes a while
The button is cool, I keep a tab open and just hit refresh when I want to try out what I did