My first YSlow Grade A (100)!

17 December 2008   6 comments   Django

http://m.fwckungfu.com

Powered by Fusion×

My first YSlow Grade A (100)! Just put in the remaining necessary cache headers on my kungfu club mobile site and I ran a YSlow! test on it and it got a 100! I've never had that before.

Admittedly, this is like cheating since the site is for mobile use it's kept very very simple and has no external dependencies so no need for a CDN. Getting a Grade A on YSlow! is very hard if the site needs to really blink. This one is built dedicated for small mobile phone screens on slow connections. I think now the bottleneck isn't in the rendering but in the connection latency for the remote database.

It also got a 4.9 (max 5.0) on ready.mobi which is the highest I've ever achieved there.

This site was developed in Django, fronted by Nginx with a remote MySQL connection to a server far away. Because of that connection I really had to get the caching right to avoid excessive SQL calls. The Debug Toolbar was instrumental to make that happen. I also used this snippet to allow me to use inline CSS and have it whitespace optimized.

Django's templates are really simplistic. I couldn't work out a way to specify cache unique keys depending on parameters so I had to do all the caching in the views.

Comments

Jason Lee
now is 98%,ha ha
Peter Bengtsson
Very funny :)
It's still 100% thank you very much
Nick
if you install memcached and turn on Django cache with memcached you'll get fastest site ever!
Peter Bengtsson
I will experiment with that once time allows. A problem is that only a small number of URLs can be memcached because cookies are set and read.
steffen
lol, a yslow grade for a site with just text links.
Peter Bengtsson
I know. It's a bit silly. Goes to show how hard it is to "impress" YSlow
Thank you for posting a comment

Your email will never ever be published


Related posts

Previous:
DianeDancesToHell.jpg 16 December 2008
Next:
Towel dog 17 December 2008
Related by keywords:
fcgi vs. gunicorn vs. uWSGI 09 April 2010
Local Django development with Nginx 11 October 2010
Is Nginx obsolete now that we have Amazon CloudFront? 28 July 2012
How I stopped worrying about IO blocking Tornado 18 September 2012
The awesomest way possible to serve your static stuff in Django with Nginx 24 March 2010
How much faster is Nginx+gunicorn than Apache+mod_wsgi? 22 March 2012
RequireJS versus HeadJS 09 January 2011
How to uninstall nginx with apt 28 March 2008
Hosting Django static images with Amazon Cloudfront (CDN) using django-static 09 July 2010
Getting uploadify to work 17 July 2009
How I profile my Nginx + proxy pass server 16 February 2011
All your images are belong to data uris 06 January 2013