This WordPress Plugin lets you to add custom css and javascript code for each page, post and custom post type separately. That code will run only on that page/post which optimize the site.
Another cool feature is that you can add general styles and scripts for whole site, only homepage or on all custom post types.