Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.

In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.

left Zymic Webmaster ForumsZymic Free Web HostingZymic Free Web Hosting - General Discussion & Help right
left right
int33h
post Mar 9 2012, 04:57 PM
Post #1


Newbie
*

Group: Members
Posts: 3
Joined: 9-March 12
Member No.: 233,536



Hello,
I'm trying to add the Expires header to some of my static resources however it looks like neither mod_expires nor mod_headers modules are not loaded. Is there a reason why these are disabled?
If not, could you please enable the mod_expires module?

Thank you
Go to the top of the page 
 
  + Quote Post
 
Start new topic
Replies (1 - 1)
int33h
post Mar 11 2012, 10:01 PM
Post #2


Newbie
*

Group: Members
Posts: 3
Joined: 9-March 12
Member No.: 233,536



While waiting for an answer I decided to try another solution that involves AddHandler and php_value auto_prepend_file directives in .htaccess that looks like
CODE
<FilesMatch "\.js$">
    AddHandler application/x-httpd-php .js
    php_value default_mimetype "text/javascript"
</FilesMatch>
php_value auto_prepend_file /path/to/expire-handler.php


And expire-handler.php looks like
CODE
<?php
$maxage = 60 * 60;
header("Cache-Control: max-age=$maxage,public");
header("Expires: ".gmdate("D, d M Y H:i:s", time() + $maxage)." GMT");
?>


However that doesn't work and I'm getting a 500 error in .htaccess.
Looks like the restrictions for htaccess are too severe.

I consider that controlling the cache settings for site resources is pretty critical. How difficult is to enable mod_expires?
Go to the top of the page 
 
  + Quote Post
 Reply to this topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 21st May 2013 - 09:04 AM