diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-09-30 17:10:51 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-09-30 17:10:51 +0200 |
commit | 2a841eb78a8b662dd7b806e6864d963f21b56667 (patch) | |
tree | 8cd4f62b85858a5c82ec0a71a4d6980f0cb37990 | |
parent | da4df73ad770c30b2e6c5d2606e11ed7dc291cd0 (diff) |
add expire header for css files and append mtime to url
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | application/views/file/html_header.php | 4 | ||||
-rw-r--r-- | data/.htaccess | 8 |
3 files changed, 11 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index 47642d17a..9f37b3504 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ data/client/ .* !.highlight !data/uploads/.htaccess +!data/.htaccess !.gitignore !system/.htaccess !application/.htaccess diff --git a/application/views/file/html_header.php b/application/views/file/html_header.php index f57884643..499b3adec 100644 --- a/application/views/file/html_header.php +++ b/application/views/file/html_header.php @@ -2,8 +2,8 @@ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title><?php echo $title; ?></title> - <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>data/paste.css" /> - <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>data/paste-<?php echo $current_highlight; ?>.css" /> + <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>data/paste.css?<?php echo filemtime(FCPATH."/data/paste.css"); ?>" /> + <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>data/paste-<?php echo $current_highlight; ?>.css?<?php echo filemtime(FCPATH."/data/paste-".$current_highlight.".css"); ?>" /> </head> <body> <div class="top_bar"> diff --git a/data/.htaccess b/data/.htaccess new file mode 100644 index 000000000..13d25207f --- /dev/null +++ b/data/.htaccess @@ -0,0 +1,8 @@ +<IfModule mod_expires.c> + ExpiresActive on + ExpiresByType text/css "access plus 1 year" +</IfModule> + +Header append Cache-Control "public" +FileEtag none + |