feature #379, multiple format, no browser cache
No need random string in URL to avoid browser cache, coding tip by @modus75
This commit is contained in:
parent
89bc74b3f3
commit
11f37b24b4
2 changed files with 2 additions and 2 deletions
|
@ -186,7 +186,7 @@ if (!url_is_remote($file))
|
|||
// HTTP/1.1 only
|
||||
$http_headers[] = 'Cache-Control: private, must-revalidate, max-age='.$max_age;*/
|
||||
|
||||
if ( isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) )
|
||||
if ('f' != $_GET['part'] and isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) )
|
||||
{
|
||||
set_status_header(304);
|
||||
foreach ($http_headers as $header)
|
||||
|
|
|
@ -677,7 +677,7 @@ SELECT *
|
|||
foreach ($formats as &$format)
|
||||
{
|
||||
$format['download_url'] = 'action.php?format='.$format['format_id'];
|
||||
$format['download_url'].= '&download='.substr(md5(time()), 0, 6); // a random string to avoid browser cache
|
||||
$format['download_url'].= '&download';
|
||||
|
||||
$format['label'] = strtoupper($format['ext']);
|
||||
$lang_key = 'format '.strtoupper($format['ext']);
|
||||
|
|
Loading…
Add table
Reference in a new issue