![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Sep 2003
Posts: 1,050
|
![]() i am trying to tell browsers to get a fresh copy of the site (JOOMLA based) after x hours using this code in htaccess.
main question is if its ok to put PHP file in there . i could not find a site that has it but since its index.php homepage i need it. Code:
# 2 HOURS <filesMatch "\.(html|htm|PHP|css|js)$"> Header set Cache-Control "max-age=7200, must-revalidate" </filesMatch>
__________________
boro en harfa chei |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Sep 2003
Posts: 1,050
|
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Oct 2003
Posts: 440
|
I've only recently had experience with far future expires headers. Off the top of my head I don't think PHP will matter one way or another. HTML/CSS/js would be how content and images are displayed. Those would be what would need to be cached.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Industry Role:
Join Date: Feb 2001
Location: Northern Cali, USA
Posts: 3,443
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Aug 2001
Location: Scotland
Posts: 2,238
|
Quote:
![]()
__________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Feb 2001
Location: Northern Cali, USA
Posts: 3,443
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Oct 2002
Posts: 3,745
|
PHP or not doesn't matter. That's fine for all of the standards compliant browsers. The tricky part is that for IE you need to tell it to not cache in three different ways in order for it to be reliable.
For older versions of IE, that needs to include in the <head> which must be placed at the ends of the document, or at very least place the caching adjectives at the end of the head. The problem is that since IE doesn't cache anything less than 512 bytes anyway, so when it refs the headers it hasn't yet decided to turn on cache, so that's too early to turn off the cache. On the other hand, IE doesn't know how to handle the Vary header, so it skips when thete is any Vary header. If you set it to Vary on hostname or URL that shouldn't hurt anything because OF COURSE different URLs have different content, but IE isn't smart enough to figure that out, so it skips caching.
__________________
For historical display only. This information is not current: support@bettercgi.com ICQ 7208627 Strongbox - The next generation in site security Throttlebox - The next generation in bandwidth control Clonebox - Backup and disaster recovery on steroids |
![]() |
![]() ![]() ![]() ![]() ![]() |