Opened 3 months ago

Closed 3 months ago

#22593 closed enhancement (fixed)

Minify HTML, CSS and JavaScript resources on all websites of the torproject.org to save a bit of bandwidth

Reported by: cypherpunks Owned by: hiro
Priority: High Milestone:
Component: Webpages/Website Version:
Severity: Major Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

https://developers.google.com/speed/docs/insights/MinifyResources

You should minify your HTML, CSS, and JavaScript resources:

Alternatively, the PageSpeed Module, integrates with with an Apache or Nginx web server to automatically optimize your site, including resource minification.

For HTTP for example with https://kangax.github.io/html-minifier/ one gets for blog.torproject.org:

Original size: 45,528. Minified size: 39,603. Savings: 5,925 (13.01%).

For bridges.torproject.org:

Original size: 4,585. Minified size: 3,451. Savings: 1,134 (24.73%).

Even do the gains are minimal, it's still impressive considering how easy it is to implement, and with time it can significantly add up and save bandwidth.

Child Tickets

Change History (7)

comment:1 Changed 3 months ago by weasel

Component: Internal Services/Tor Sysadmin TeamWebpages/Website
Owner: changed from tpa to linda

comment:2 Changed 3 months ago by cypherpunks

For www.torproject.org HTML:

Original size: 15,052. Minified size: 10,178. Savings: 4,874 (32.38%).

For check.torproject.org HTML:

Original size: 7,898. Minified size: 5,076. Savings: 2,822 (35.73%).

Last edited 3 months ago by cypherpunks (previous) (diff)

comment:3 Changed 3 months ago by cypherpunks

Priority: MediumHigh
Severity: NormalMajor

comment:4 Changed 3 months ago by arma

Don't browsers do compression generally?

So the numbers from the above comment don't actually represent the savings we'd get?

comment:5 in reply to:  4 Changed 3 months ago by teor

Replying to arma:

Don't browsers do compression generally?

So the numbers from the above comment don't actually represent the savings we'd get?

Most sites that minify, minify then rely on the server/browser to negotiate compression.
(For example, non-local scoped identifier names can't be minified, but they can be compressed.)

comment:6 Changed 3 months ago by hiro

Owner: changed from linda to hiro
Status: newaccepted

I'd love to see the PageSpeed module integrated in our apache config. Meanwhile I'll minify resources myself and since I am the one updating the current website more frequently I'll make sure to maintain this.

Last edited 3 months ago by hiro (previous) (diff)

comment:7 Changed 3 months ago by hiro

Resolution: fixed
Status: acceptedclosed

Sources are now minified.

Note: See TracTickets for help on using tickets.