Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Setting an expiry date in the HTTP headers

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

  1. carlosBabel

    carlosBabel Registered

    Dec 28, 2012
    Likes Received:
    Trophy Points:
    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

    Feb 25, 2010
    Likes Received:
    Trophy Points:
    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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice