---
title: "google pagespeed禁用改写html文件的cache头"
author: "haohetao"
date: "2019-09-04T19:51:17Z"
tags: []
categories: ["操作系统"]
slug: "google-pagespeed-html-cache"
draft: false
lastmod: "2019-09-04T19:59:39Z"
id: 2444100
url: "https://haohetao.iteye.com/blog/2444100"
---

这会禁用html文件的缓存，无法读取last-modified头部

我是在使用packagist mirror的时候发现这个问题的，因为packagist mirror使用last-modified来判断最后同步时间

加入以下配置解决

Apache:  
ModPagespeedModifyCachingHeaders off;

 

Nginx:  
pagespeed ModifyCachingHeaders off;