Most of what I learned on the web in my early years was from “View Source”. Then came the books and the conferences.
It makes me sad to see lots of sites minifying code for performance and not releasing the full version of the code so other developers could learn from it. It’s the openness that I really like about the web.
I think there should be a “View Source Alliance” that would set rules on how to release your code in a way that visitors can benefit from the speed of minified code, while web developers can still find your full files and learn from them.
I’ll set a few simple rules here, hoping somebody with more reach picks them up:
- If you minify the files for them, use a simple convention name.min.ext (say jquery.min.js)
- When you deploy minified files, also deploy their full version at name.ext (say jquery.js)
- If you for some reason can’t release the full files next to the minified ones, add this to the top of the minified file: /*viewsource*http://path.to/full.ext*/ (say /*viewsource*http://http://code.jquery.com/jquery-1.4.4.js*/)
This way you will not only help others, but sometimes even stop breaking the law. Because you might be using some open source code with a licence that says you must release your code with a same/similar licence.