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.
16 December 2008
- Towel dog
17 December 2008
- Related by category:
- Efficient many-to-many field lookup in Django REST Framework
11 April 2018
- How to have default/initial values in a Django form that is bound and rendered
10 January 2020
- Best way to count distinct indexed things in PostgreSQL
21 March 2019
- Update to speed comparison for Redis vs PostgreSQL storing blobs of JSON
30 September 2019
- Django ORM optimization story on selecting the least possible
22 February 2019
- Related by keyword:
- Be very careful with your add_header in Nginx! You might make your site insecure
11 February 2018
- How to deploy a create-react-app
04 November 2016
- How I simulate a CDN with Nginx
15 May 2019
- Comparing KeyCDN and DigitalOcean's new Spaces CDN
28 September 2018
- To CDN assets or just HTTP/2
17 May 2018