#1
  1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2005
    Location
    UK
    Posts
    556
    Rep Power
    82

    Only cache certain files


    Hi I dont want any sensitive data to be cached and have added the following meta settings
    Code:
    Cache-control: no-store
    Pragma: no-cache
    The problem is the site is also very image hungry.
    Is there any way to cache just the images and nothing else?
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,127
    Rep Power
    4304
    This isn't really an HTML question. Which web server are you using? Apache? IIS?

    Are you sure you don't want stylesheets to be cached as well?
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2005
    Location
    UK
    Posts
    556
    Rep Power
    82
    The site is on Apache. It would be good to have a choice of caching certain client sided elements not just images.

    I'm looking for a way to control what is cached on the client side

    EDIT: I should of really called this thread "Only cache certain files"
    Last edited by pfwd.tech; August 20th, 2010 at 07:23 AM.
  6. #4
  7. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,127
    Rep Power
    4304
    Look into using "<FilesMatch>" and "Header set".

    You could also look at the results of this search: http://www.google.com/search?q=apach...aching+headers

    I'll move this thread to the Apache forum for you. I changed the title for you too.

    *** Thread Moved ***
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  8. #5
  9. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2005
    Location
    UK
    Posts
    556
    Rep Power
    82
    Thanks, I think cache control headers will do it.
    I want to stop caching pdf files in IE7 once they are opened.
  10. #6
  11. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2005
    Location
    UK
    Posts
    556
    Rep Power
    82

    Its IIS and not Apache


    Unfortunately this is for an IIS box (I was mistaken and thought it was apache before). Anyone know if there is an IIS setting I can change to prevent PDF's from caching?
  12. #7
  13. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,127
    Rep Power
    4304
    In that case, I suggest you PM requinix and ask him to move this thread to the IIS forum for you.

    I know how to do basic things in IIS, but have no idea how to do this in it.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  14. #8
  15. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    Thread moved from Apache to IIS ..
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.

IMN logo majestic logo threadwatch logo seochat tools logo