I see these default scripts are still loaded with my site on a new theme I bought:
<script type="text/javascript" src="http://www.princessly.com/js/scriptaculous/builder.js"></script>
<script type="text/javascript" src="http://www.princessly.com/js/scriptaculous/effects.js"></script>
<script type="text/javascript" src="http://www.princessly.com/js/scriptaculous/dragdrop.js"></script>
<script type="text/javascript" src="http://www.princessly.com/js/scriptaculous/controls.js"></script>
<script type="text/javascript" src="http://www.princessly.com/js/scriptaculous/slider.js"></script>
Is it safe to get rid of them all as they pose significant number of requests per page view. How do I know if my theme uses them?
Thanks!
If you want to eliminate the files, you could either do a code review of your templates and supplied javascript to see if they’re used and remove them if they aren’t. A slightly less scientific approach is to remove each one in turn and test to see if anything breaks!
If your main concern is number of requests, use the settings under System -> Configuration -> Advanced -> Developer to combine the JS (and/or CSS) into a single file. You’ll ship the same number of bytes, but in fewer requests.
Third party extensions such as Fooman Speedster add minification for additional performance improvement.