Allow static files served to web client to be cached

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Post Reply
dstebila
Posts: 1
Joined: Fri May 08, 2009 12:18 pm

Allow static files served to web client to be cached

Post by dstebila »

The static files (.js, .css, .png files) served by the built in web server do not seem to be cached by Safari or Firefox, so they have to be requested each time. For those that access the web server remotely over a slow connection, this can add seconds to the loading time. By adding Date and Expires headers to the HTTP response, the files can be cached to save on loading time.

I have created a ticket in trac http://trac.transmissionbt.com/ticket/2043 and uploaded a patch to that ticket that modifies libtransmission/rpc-server.c so that static files are served with a Date header that has the current time and an Expires header that is 24 hours from the current time.
Post Reply