In my Rails app, every page includes all of the JavaScripts in assets.
Some custom scripts are for Ajax and some fancy stuff. which run unnecessarily from every page and are causing me unnecessary overload.
For example, the session page doesn't really need any JavaScript at all, still all scripts are included. How do I change this? I have Rails 3.2.2.
<script src="/assets/jquery-1.7.2.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ui.core.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ui.widget.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ui.position.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.ui.autocomplete.js?body=1" type="text/javascript"></script>
<script src="/assets/special.js?body=1" type="text/javascript"></script>