The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting an expiry date in the HTTP headers

Discussion in 'General Discussion' started by carlosBabel, Jan 3, 2013.

  1. carlosBabel

    carlosBabel Registered

    Joined:
    Dec 28, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    How do I Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network?

    Basically I need to set Expires & Last-modified to set caching headers aggressively for all static resources

    I've read documentation and it seems i should do it over easyapache, but i dont have access to that option in my whm. Im not the server administrator. Thank You, sorry for my english :(
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    mod_expires can be enabled or disabled using EasyApache by the server administrator. You need to ask the server administrator (your host) whether mod_expires is available.

    If mod_expires is available, you can use its directives in .htaccess files, which do not require root (administrator) access. The Apache documentation explains the mod_expires directives you can use:

    mod_expires - Apache HTTP Server

    Note that it says:

    for each of the directives, so you can use them in .htaccess files, unless your host has disallowed your capability to override directives. That is a possibility, so you need to ask your host exactly what is allowed.

    A search for "last-modified .htaccess" in your favorite search engine will give you a list of several documents that offer suggestions for using or removing last-modified from the header.
     
Loading...

Share This Page