Daniel Alexiuc
Daniel Alexiuc

Reputation: 13240

How to Enable GZIP compression on Play Framework 1 app on Heroku Cedar?

I'd like to enable GZIP compression for public assets and HTTP responses for performance. My site has a lot of mobile access.

As far as I can tell, there is nothing built into Play Framework to support this, and Heroku doesn't seem to have a solution either.

What is the best way to start getting some compression on my app?

Upvotes: 11

Views: 5215

Answers (3)

Daniel Alexiuc
Daniel Alexiuc

Reputation: 13240

Ok I've had a go at minifying and gzipping all STATIC resources - nobody seems to have attempted this yet.

Play provides a hook by means of a plugin, but it seems a little hacky as you have to set all the caching headers and stuff.

Seems to work so far though:

https://gist.github.com/2882360

Upvotes: 6

James Ward
James Ward

Reputation: 29433

Check out: https://gist.github.com/1317626

Upvotes: 6

Gelin Luo
Gelin Luo

Reputation: 14373

Check Minifymod module: http://www.playmodules.net/module/7

Upvotes: 5

Related Questions