This is exactly how I did this for quite a while now. Today I think there's better ways to do this: Since modern websites (should) use some sort of JS compression (Minify, Dojo Compressor, Google Closure, etc.) you could as well update the link to the JS file in your HTML document whenever you run the compiler. Thus you can move away this freshness-determination from the Frontend and do that server side. Usually, I use jQuery with some dozen plugins, so I save a dozen file accesses upon request.