Following on from the recent s-plugins.wordpress.org CDN change, we need to add some cache-busting version params to the Plugin headers on WordPress.org, as the CDN doesn’t expire the cached images.
Compare http://wordpress.org/extend/plugins/all-in-one-event-calendar/ to http://s-plugins.wordpress.org/all-in-one-event-calendar/assets/banner-772×250.jpg?bust-cache and you’ll see the previously cached image on the plugin page.
This was brought up by on wp-hackers by Yanislav (Header image in WordPress plugin repository), Mike also added:
Don’t know if you or anyone else has noticed but the banner image is being served with Content Type “application/octet-stream” instead of with “image/jpeg.” Not a big deal but it’s not correct HTTP and more practically it causes a browser to download the file rather than display it if accessed directly via a URL.
Otto 12:47 am on August 1, 2012 Permalink | Log in to Reply
Revision is something I know about and have been working on, along with putting the screenshots there. The content type is news to me, but we can probably adjust it.
Dion Hulse 12:55 am on August 1, 2012 Permalink | Log in to Reply
The content-type header is what mod_svn serves files as IIRC, so I’m not sure if we can intercept the request and rewrite the headers, or if it’s even worth changing.
Barry 2:40 am on August 1, 2012 Permalink | Log in to Reply
This is a downside of serving the content from subversion. Currently, we never see the requests (they are proxied from CDN –> SVN Server). The “correct” way to do this is to set the
mime-typeproperty in SVN Reference. For now, I say wontfix. If it becomes a bigger problem later, we can come up with a more complicated solution.Otto 3:37 pm on August 2, 2012 Permalink | Log in to Reply
Implemented cache busting for banners. It will add a ?rev=123456 to the URL on banner images. The number is the revision of the last change made to the plugin’s assets directory, meaning that the cache will only get busted when they change the banners in some manner.
Because I’m saving this revision number on plugin-update, plugins that need the banner busted now can just perform any update to make it take effect immediately. Touching the readme.txt with an irrelevant change would do the trick.