Currently this URL causes a 12 second slow-down when loading the edit page on extranet:
http://extranet.atlassian.com/includes/js/tiny_mce/zip_src?theme=advanced&language=en&plugins=table%2Cpaste%2Cemotions%2Cfullscreen%2Cconfluence
It is approx 300kb of content that is sent uncompressed, and sent every time (as it has the must-revalidate header):
Date: Tue, 13 Mar 2007 23:33:16 GMT
Server: Apache/2.0.52 (Red Hat)
X-Confluence-Cluster-Node: Member(Id=2, Timestamp=2007-03-09 04:22:50.186, Address=172.16.0.10:8088, MachineId=57135)
Cache-Control: must-revalidate
Expires: Wed, 14 Mar 2007 00:33:16 GMT
Content-Length: 302263
Connection: close
Content-Type: text/javascript
We should fix this to serve it through the caching servlet "/s". To do this, we can't pass any parameters to the url, as by default, most browsers won't cache requests that have request parameters.
I'm raising this as a bug, as it causes severe performance penalties over slow connections. 300kb on every edit.
Plan
1. Modify TinyMCE servlet to return a url without parameters. The options will be encoded in the URL somehow in a non-parameter way to allow for caching.
2. Modify the TinyMCE servlet to interpret the parameters from the encoded URL.
3. Add a URLRewrite rule in web.xml to pass this new URL throw the ResourceDownloadUtils addCacheHeaders method.