zoukankan      html  css  js  c++  java
  • xampp 开启缓存(二)

    开启浏览器缓存后,在内容未过期前,浏览器不会重复从服务器提取数据文件,从而减少网页内容传输,提高网页打开速度。

    (1) 编辑Apache配置文件httpd.conf,查找下面这一行

    1
    #LoadModule expires_module modules/mod_expires.so

    删除前面的#;如没有就查找LoadModule位置,加入上述行

     (2) 在httpd.conf末尾增加以下内容:

    01
    02
    03
    04
    05
    06
    07
    08
    09
    10
    11
    12
    13
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 12 month"
    ExpiresByType text/html "access plus 12 months"
    ExpiresByType text/css "access plus 12 months"
    ExpiresByType image/gif "access plus 12 months"
    ExpiresByType image/jpeg "access plus 12 months"
    ExpiresByType image/jpg "access plus 12 months"
    ExpiresByType image/png "access plus 12 months"
    EXpiresByType application/x-shockwave-flash "access plus 12 months"
    EXpiresByType application/x-javascript "access plus 12 months"
    ExpiresByType video/x-flv "access plus 12 months"
    </IfModule>
  • 相关阅读:
    POJ3666 Making the Grade[动态规划]
    vector内部的实现1
    win32概述
    stl概述
    C++概要简介
    类的常量成员
    模板
    c11标准
    异常处理
    pak文件的打包和解包
  • 原文地址:https://www.cnblogs.com/free3649/p/4067140.html
Copyright © 2011-2022 走看看