That's a really nice idea. How does doing this on the server side effect performance? Maybe ye can cache the result.
We use a caching from Amazon CloudFront. They have a great feature 'custom origin'. We just put our heroku server URL as an origin for CloudFront and configured HTTP headers properly. After that we were able to significantly reduce the load on a server.
We also blogged about it: http://blog.elastic.io/post/22773181715