[Solved] Please help me in setting up expire headers.

Discussion in 'General' started by kan3, Feb 11, 2011.

  1. kan3

    kan3 Active Member


    Please kindly help me in setting up the expire headers.

    I want expire headers for,


    I want to set the period to 7 days.

    Thank you.
  2. NiteWave

    NiteWave Administrator

    admin console->Server->General->Expires Settings->Expires By Type
  3. kan3

    kan3 Active Member

    Thank you for your swift reply.

    Will this be correct syntax?

    text/css=A604800, text/javascript=A604800, application/javascript=A604800, application/x-javascript=A604800, application/x-shockwave-flash=A604800, image/gif=A604800, image/jpg=A604800, image/jpeg=A604800, image/png=A604800, image/ico=A604800, image/icon=A604800

    Thank you.
  4. kan3

    kan3 Active Member

    Ok I've added the above line.

    However static content is still not being cached. Please help.

    Thank you.
  5. webizen

    webizen Well-Known Member

    Please post some example in question here.
  6. kan3

    kan3 Active Member


    Expire settings:

    Gzip Settings

    Mime Settings:

    Thank you.
  7. NiteWave

    NiteWave Administrator

    GZIP Compression ->
    Compressible Types,

    please remove "image/*", and restart lsws
  8. kan3

    kan3 Active Member

    Nitewave thank your for helping. But it's still same. I removed image/* like you said.

    Thank you.
  9. NiteWave

    NiteWave Administrator

    the server's expire setting can be overridden by vhost or .htaccess or php script

    no problem found on the setting you posted.

    please check .htaccess or httpd.conf, if

    ExpiresActive off

  10. kan3

    kan3 Active Member

    This is what I saw in httpd.conf,

    <IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-gzip .tgz
    AddEncoding x-compress .Z
    AddEncoding x-gzip .gz .tgz
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddHandler cgi-script .cgi
    AddHandler type-map var
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType video/x-ms-asf .avi
    AddType video/mpeg .mpg
    AddType video/mpeg .mpeg
    AddType video/quicktime .mov
    AddType video/x-ms-wmv .wmv

    Does this helps or should I post the whole httpd.conf file?

    Thank you.
  11. webizen

    webizen Well-Known Member

    Please add the following directive in your httpd.conf or .htaccess.

    ExpiresActive On
  12. kan3

    kan3 Active Member

    That fixed it.

    Thank you very much.
  13. NiteWave

    NiteWave Administrator

Share This Page