Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

If-Modified-Since header

Discussion in 'Website Coding & Programming Forum:' started by Levi, Oct 20, 2014.

  1. Levi

    Levi Moderator Staff Member

    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?
     
  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...
     
  3. Levi

    Levi Moderator Staff Member

    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 :(.
     
  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.
     
  5. Levi

    Levi Moderator Staff Member

    bleh, pita I hate dealing with hosting providers lol
     
  6. Then you should use a hosting service that you can enjoy dealing with. They're not all the same ;)
     
  7. Levi

    Levi Moderator Staff Member

    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....
     
  8. Did you find out?
     
  9. Levi

    Levi Moderator Staff Member

    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
     
  10. I believe it's one of many smaller things that Google will score you on.
     
  11. Levi

    Levi Moderator Staff Member

    If I was to worry over everything google scores me on I'll never finish my site lol
     
  12. Google could never have been founded, you still aren't going to finish your site any time soon ;P
     
    0jerome0 likes this.
  13. Levi

    Levi Moderator Staff Member

    '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.
     
    0jerome0 likes this.
  14. You should have used WP or Foundation :p Would have been done much quicker!!
     
    0jerome0 likes this.
  15. Levi

    Levi Moderator Staff Member

    nah wanted to do it from scratch
     
    0jerome0 likes this.
  16. Have you even looked at Foundation...?
     
    0jerome0 likes this.
  17. Levi

    Levi Moderator Staff Member

    yeah I looked at it (and others)...I didn't really get a good feel for them from the website though
     
    0jerome0 likes this.
  18. Care to elaborate? Others?
     
    0jerome0 likes this.
  19. Levi

    Levi Moderator Staff Member

  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?
     
    0jerome0 likes this.

Share This Page