[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #22593 [Internal Services/Tor Sysadmin Team]: Minify HTML, CSS and JavaScript resources on all websites of the torproject.org to save a bit of bandwidth
#22593: Minify HTML, CSS and JavaScript resources on all websites of the
torproject.org to save a bit of bandwidth
-----------------------------------------------------+-----------------
Reporter: cypherpunks | Owner: tpa
Type: enhancement | Status: new
Priority: Medium | Milestone:
Component: Internal Services/Tor Sysadmin Team | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-----------------------------------------------------+-----------------
> https://developers.google.com/speed/docs/insights/MinifyResources
>
> You should minify your HTML, CSS, and JavaScript resources:
* '''To minify HTML,''' try [https://github.com/kangax/html-minifier
HTMLMinifier]
* '''To minify CSS,''' try [https://github.com/ben-eb/cssnano CSSNano]
and [https://github.com/css/csso csso].
* '''To minify JavaScript,''' try [https://github.com/mishoo/UglifyJS2
UglifyJS]. The [https://developers.google.com/closure/compiler Closure
Compiler] is also [https://github.com/samccone/The-cost-of-transpiling-
es2015-in-2016#summary-of-findings very effective]. You can create a
build process that uses these tools to minify and rename the development
files and save them to a production directory.
> Alternatively, the
[https://developers.google.com/speed/pagespeed/module/ 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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22593>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs