I'm building a file server. It is currently serving downloadable files (.doc, .zip) perfectly using X-Send. It is possible to serve text based (css/javascript) or image files using x-send? My understanding is this the most efficient method available but I am always open to ideas.
The code I currently have...(tried various versions with lines commented out/in)
//header('Content-Disposition: inline; filename="' . basename($cacheFile) . '"');
header('Content-Type: text/css');
//header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
//header('Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT');
//header('Cache-Control: no-store, no-cache, must-revalidate');
//header('Pragma: no-cache');
//header('Content-Length: ' .(string)(filesize("./cache/".$cacheFile)));
header('X-Sendfile: /path/to/site.css');