Hi! Caching seems complex and I am fairly new to it.
I found out that T5 delivers a 304 for assets that have not been modified since they where fetched. I.e. there is one server request per asset. [When serving an asset T5 delivers a last modified header. And clients sends If-Modified-Since when asking for an asset.] My question is, if my findings are correct. Would it be possible to tell clients to cache assets for ever and use the version to force a reload. I.e. the way I thought it worked ... /Gunnar 2012/2/28 Steve Eynon <steve.ey...@alienfactory.co.uk> > Hi, > > I'm sure if you're asking about what T5 serves up, or how the client > interprets what it is served? > > Ultimately you have no control over what the client does - if the > client wants to make a request, it'll make a request. At best all the > server can do is 'suggest' and 'hint' to the client that it uses it's > cache. Hence the 304's, the If-Modified-Since headers and everything > else we throw at the client. > > But if the client has a small cache limit, or is new to the site, then > regardless, it's going to make lots of requests. > > Steve. > > On 27 February 2012 22:58, Gunnar Eketrapp <gunnar.eketr...@gmail.com> > wrote: > > Hi! > > > > Recently I made a fix so that my uploaded images (stored in db) are > cached. > > > > I did this by returning status 304 (HTTP status not modified) as I found > > out that T5 handles asset requests in that way. > > > > But this means that the client has to perform a request for each > > asset/image. > > > > I thought that the adding of the application version to the assets url > was > > there to inform clients when assets needed to be refetched > > and that they should be fetched from client cache (without a request) > > otherwise. > > > > For my images, the ideal would be as Howard pointed out to add a hashed > > signature to my image url:s and to cache them forever on client side. > > > > But as I found out T5 assets are not handled that way I skipped the hash > > code and just performed a check on the header "If-Modified-Since". > > > > What have I missed? Am I right when i say that T5 assets are handled > with > > a request + 304 reply. > > > > Thanks in advance, > > Gunnar Eketrapp > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- [Hem: 08-715 59 57, Mobil: 0708-52 62 90] Allévägen 2A, 132 42 Saltsjö-Boo