summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--application/views/file/html_header.php4
-rw-r--r--data/.htaccess8
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
+