mountainpenguin / pyrt

python rtorrent webUI
GNU General Public License v3.0
34 stars 11 forks source link

Web Speed Optimisations #8

Closed mr-bo-jangles closed 12 years ago

mr-bo-jangles commented 12 years ago

Report from Chrome - Apparently this will help speed up the user interface by 68% so maybe a good idea to follow?

Combine external JavaScript (5)

There are multiple resources served from same domain. Consider combining them into as few files as possible. 5 JavaScript resources served from giggaworld.co.uk.

Enable gzip compression (4)

Compressing the following resources with gzip could reduce their transfer size by about two thirds (~265.77KB): :8000/?view=main&sortby=size&reverse=1 could save ~254.46KB injected.js could save ~2.49KB style.css could save ~1.83KB page_context.js could save ~7.00KB

Leverage browser caching (20)

The following resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers: main.css jquery-ui-1.8.13.custom.css jquery-1.6.1.min.js jquery-ui-1.8.13.custom.min.js jquery.contextmenu.r2.js jquery-sliderow.js main.js sort_none.gif sort_down.gif pause.png stop.png remove.png delete.png start.png hash.png ui-bg_flat_75_ffffff_40x100.png injected.js style.css page_context.js The following resources are explicitly non-cacheable. Consider making them cacheable if possible: :8000/?view=main&sortby=size&reverse=1

Leverage proxy caching (9)

Consider adding a "Cache-Control: public" header to the following resources: sort_none.gif sort_down.gif pause.png stop.png remove.png delete.png start.png hash.png ui-bg_flat_75_ffffff_40x100.png

Specify image dimensions (13)

A width and height should be specified for all images in order to speed up page display. The following image(s) are missing a width and/or height: :8000/../images/sort_none.gif (5 uses) :8000/../images/sort_down.gif :8000/../images/pause.png (4 uses) :8000/../images/stop.png (164 uses) :8000/../images/remove.png (164 uses) :8000/../images/delete.png (164 uses) :8000/../images/start.png (160 uses) start.png stop.png (2 uses) remove.png (2 uses) delete.png (2 uses) hash.png (2 uses) pause.png

Web Page Performance

Optimize the order of styles and scripts (1)

The following external CSS files were included after an external JavaScript file in the document head. To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript. - style.css

Remove unused CSS rules (356)

28.83KB (78%) of CSS is not used by the current page.

main.css: 3.57KB (51%) is not used by the current page. jquery-ui-1.8.13.custom.css: 22.56KB (83%) is not used by the current page. style.css: 2.70KB (100%) is not used by the current page.

mountainpenguin commented 12 years ago

minifying js and using gzip compression should be relatively simple to implement

I'll get on this as soon as possible

cache-manifest should be easy too, though I should think most browsers will automatically cache (at least partially) the majority of the static stuff already