Hey Guys Ok so i have an mp3 file which is streamed occasionally now i want to save the cache directly everytime someone opens the file for streaming once.. so basically once its opened its saved in their cache for a particular amount of time say 1 month i know we can do it using .htaccess can anyone help ?
If you have mod_headers installed for Apache, you can just do something like this in your .htaccess or .conf file: Header set Cache-Control "public, max-age=2592000" Code (apache):
<ifModule mod_expires.c> ExpiresActive On ExpiresDefault A1 ExpiresByType audio/mpeg A5184000 </ifModule> ExpiresActive On ExpiresDefault A1 # Set up caching on media files for 2 month <FilesMatch "\.(ico|mp3)$"> ExpiresDefault A5184000 Header append Cache-Control "public" </FilesMatch> Is this correct ?? or should i use <FilesMatch "\.(ico|pdf|flv|jpe?g|png|gif|js|mp3|swf)$"> Header set Cache-Control "public,max-age=2592000" </FilesMatch>