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>
  • 相关阅读:
    关于日志造成的频繁的IO
    PHP
    gitignore
    Linux安装gradle
    Ambari和ClouderManager分析对比
    原生hadoop生态系统组件安装文档
    hive的数据类型和数据模型
    hive概述
    使用binlog和canal从mysql实时抽取数据
    canal概述
  • 原文地址:https://www.cnblogs.com/free3649/p/4067140.html
Copyright © 2011-2022 走看看