• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

If-Modified-Since header


Levi

Moderator
Staff member
#1
Quick question.... Sean might be able to help here as it's showing as working on his site... but it's not on Tony's or mine :)

Using this tool it shows mine is not working. Everything I've found online basically says I need to add in something like the below for it to work on an apache server (cpanel in my case), which I have.

From what I can find I need to add
<code>ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"</code>

Any ideas why it's not working?
 
S

Sean Lee-Amies

Guest
#2
What I've found is the most WP sites don't come with this functionality automatically because the issue of whether a page has been updated or not is made more complicated when content is being pulled from a database, another page or external source. It's much easier to set it up using a static web page. If you are using WP then you can use a plug-in that will do it for you.

If not, you'll need to find out whether or not your host/server has mod-rewrite enabled, and it will likely involve making some changes to the .htaccess file or writing some PHP...
 

Levi

Moderator
Staff member
#3
It's not wordpress, it's a static site.

.htaccess has 'RewriteEngine on' mentioned on it, so I'm assuming that it is enabled.

It's really weird because to me everything seems to be correct, I'm not going to lose sleep if I can't get it working, it's just that it gets mentioned by that site up top when I do a check :(.
 
S

Sean Lee-Amies

Guest
#4
Send an email to your hosting provider and find out if they have enabled mod-rewrite - the .htaccess file has nothing to do with this.
 
S

Sean Lee-Amies

Guest
#6
Then you should use a hosting service that you can enjoy dealing with. They're not all the same ;)
 

Levi

Moderator
Staff member
#7
nah, they're usually pretty good (and BRITISH!!!), it's just the hassle of getting in touch... I just hate dealing with customer services in general....
 

Levi

Moderator
Staff member
#9
not yet... been doing other things, not even sure if I'll bother yet because I can't see anything definitive about it being important or not for seo
 
S

Sean Lee-Amies

Guest
#12
Google could never have been founded, you still aren't going to finish your site any time soon ;P
 

Levi

Moderator
Staff member
#13
'beta' will be online within a month if all goes to plan (contact form being the issue) :p

I may still need to add some showcase content but the rest will be sorted and ready to go.... I hope.
 
S

Sean Lee-Amies

Guest
#20
I think you misunderstood the question. When you say you didn't get a good feel for them, what exactly was it that you didn't like?