Tor Network Status Website - Reduce the page size!!

Joseph B. Kowalski jbk at hush.ai
Tue Nov 7 07:24:43 UTC 2006


Hi Xiando,


Thanks for your feedback.

RE:
>May I say that your page contains a huge truckload of donkey dong? 
>It takes 
>hours to download the status page, even longer when using Tor.
>
>Every single line contains this (what I mean by "donkey dong"):
>
>td bgcolor='#ffffff' align='left' valign='center' .. font 
>face='Tacoma' 
>color='#000000' size='3'
>
>The obvious question is: Could you perhaps do this using CSS? The 
>webpage 
>turns out 2.2MB of... above mentioned HTML.
>
>Also, the server doens't do Content-Encoding: gzip.
>
>In bullet summary, the page is 2.2MB and could perhaps be trimmed 
>down to 
>300-400K and still look almost the same to the user by cleaning up 
>the HTML.
>
>Mr. BlueStar88's Tor status page http://torstat.xenobite.eu/ gives 
>a page 
>which is 905K with exactly the same information - which is less 
>than half the 
>site of above mentioned page. And even that could also be 
>reduced...
>


Yeah, the page size was too big. I hadn't really spent any time on 
optimization yet when I sent out my original post. Anyways, I have 
went through and re-done a lot of the HTML and made moderate use of 
CSS to reduce the page size. I've also enabled gzip Content-
Encoding on the web server. Here is the difference from all of 
that, doing a full listing of all Tor routers (~1100):

Old page, uncompressed (What you saw): 2,204,353 bytes
Old page, gzip compressed: 89,676 bytes

New page, uncompressed: 610,700 bytes
New page, compressed: 66,380 bytes

So, from ~2.2 MB to ~66 KB being transferred on the wire.


>Also, "Named" could be done with bold on the server name, instead 
>of using a 
>table cell for yes/no.

Yes, it could be. Just another way of doing things.

>Mr. BlueStar88's also figures out if there is something on port 80 
>which 
>serves a web page and links to it, which is very good and may 
>encurage people 
>to run Tor-servers (look!! my site gets advertised on the status 
>pages if I 
>run a Tor server!!)
>

While this is certainly an interesting feature, this is actually 
something that I respectfully disagree with. First, a server 
operator may not necessarily want to advertise to the world that he 
has a web server running (Sure, I know it's easy to find out, but 
I'm talking about actually pointing it out). Second, it may be a 
server shared by multiple people, and the person running the Tor 
server may have nothing to do with the person running the web 
server. Third, you would have to access the web server by IP. A lot 
of web servers nowadays run multiple sites on port 80, 
distinguishing between them by way of the HOST header provided by 
the client (HTTP 1.1). You would not know (off hand) what HOST 
headers you would need to provide to access the various content of 
the site if they operated in such a way. 

As an aside, on web servers I administer, I usually have all access 
directly by the IP go to a seperate virtual server that just serves 
up a blank page, has access to no content, etc., since nowadays 
usually the only things accessing by IP are various worms and 
malware, etc. You need to know a HOST header to get to any content. 
This won't stop a smart attacker, of course, but it cuts out 90% of 
the automated scan crap. 

>Also, you may want to consider putting up a pure text (perhaps 
>gzipped) 
>version of the page as Free Speech & Tor-haters (Those bastards!) 
>tend to 
>setup scripts who download status pages hourly and parse them and 
>make evil 
>blocking-scripts. Having some Tor-hater download 2.2MB every hour 
>is probably 
>sad and depressing.
>

This is also a reasonable idea, and might be something I do in the 
future, although it's probably less critical with the page size 
being smaller now.

>> If there is any interest, I can package up the code and DB 
>creation
>> script and distribute it. Or, feel free to use the site where it
>> is. Let me know.
>
>Sexy. Put a link where the source can be wr0red at the bottom of 
>the page or 
>something. Or just mail it to me. :D

Done. Such a link now exists at the bottom of the page:

https://nighteffect.com/tns


Best regards,


Joe





More information about the tor-talk mailing list