Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2043 closed Enhancement (fixed)

Allow static files served to web client to be cached

Reported by: dstebila Owned by: charles
Priority: Normal Milestone: 1.61
Component: libtransmission Version: 1.60
Severity: Normal Keywords:
Cc:

Description

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.

The attached patch modified 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.

The Date and Expires headers are defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21

Attachments (1)

rpc-server.diff (1.3 KB) - added by dstebila 12 years ago.
Patch to libransmission/rpc-server.c

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by dstebila

Patch to libransmission/rpc-server.c

comment:1 Changed 12 years ago by charles

  • Milestone changed from None Set to 1.61
  • Status changed from new to assigned

comment:2 Changed 12 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

patch committed in r

comment:3 Changed 12 years ago by charles

comment:4 Changed 12 years ago by charles

dstebila: thanks for the patch, btw..

Note: See TracTickets for help on using tickets.