tag:blogger.com,1999:blog-1735220007410867655.post6631940632945587561..comments2013-05-06T10:52:49.635+02:00Comments on the need for speed, tests and clean code: Stripes Image StreamingresolutionRichard Hauswaldhttp://www.blogger.com/profile/11808218202140013343noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-1735220007410867655.post-10839191686767629912009-06-30T20:49:02.265+02:002009-06-30T20:49:02.265+02:00don't know if that applies here but in standar...don't know if that applies here but in standard servlets the response also hints the buffer size used.roshhttps://www.blogger.com/profile/14814504956849213235noreply@blogger.comtag:blogger.com,1999:blog-1735220007410867655.post-8944770132166521262009-06-20T14:16:34.092+02:002009-06-20T14:16:34.092+02:00You're right, streaming the file directly is t...You're right, streaming the file directly is the less silly approach.<br /><br />Calculating the expires date is a little bit out of the scope of this article. The number of 30 days from now was just a result of my.heads.util.Random class :-)<br /><br />A rule of thumb is that setting the expires date to tomorrow will increase performance and decrease server load in most cases. The performance gain in setting it more deep into the future won't be that hight.<br /><br />If you are interested in this topic you can find a very nice article here: http://developer.yahoo.com/performance/rules.html . Look for the part called "Add an Expires or a Cache-Control Header".Richard Hauswaldhttps://www.blogger.com/profile/11808218202140013343noreply@blogger.comtag:blogger.com,1999:blog-1735220007410867655.post-147667394984025002009-06-20T11:20:50.060+02:002009-06-20T11:20:50.060+02:00Why would you want to read the file into a byte ar...Why would you want to read the file into a byte array instead of streaming it directly? <br /><br />Also what scientific approach did you use to calculate the expires-date?roshhttps://www.blogger.com/profile/14814504956849213235noreply@blogger.com