how to maintain Version for css and Java script in html
how to compress java script in run time
how to maintain Version for css and Java script in html
how to compress java script in run time
To compress Javascript in runtime, you can call a server-side page which read your javascript file, minimize and cache it and return your compressed file. So you'll have to do something like:
<script src="Minimize.aspx?YourJavascriptFile.js"></script>
But, if you compress it before upload, you can save some processor cycles and memory.
To maintain javascript and css versions, you can add a version number after the file name:
<script src="MyMinimizedScript.js?version=1"></script>
when you change the javascript (or do the same for css), just change the version number. Your file name does not need to change.