Firefox deprecated HTTP, and instead vigorously promote the action of HTTPS a stone to arouse thousands of waves, many do not install security certificate of the Web site using the new version of Firefox has not been opened. Before our site only involved the need to encrypt the part of the connection as the HTTPS protocol, it seems to have to the entire site connection is installed HTTPS. The problem is that the function that was running normally is the same. In detail, the Product List page uses AJAX to load the product without caching the data that was loaded before. The reason for this situation is mainly two points, the 1th is the filter set in the background to force each page does not cache content, the second reason is because the entire site is encrypted, so that the browser itself will no longer page cache. The solution to this problem is to set the force cache on the page that needs to cache the data, as follows:
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" ><%@ page Language= "java" import= "java.util.*" pageencoding= "Utf-8"%><%@ taglib prefix= "C" uri= "http://java.sun.com/jsp /jstl/core "%><%@ taglib prefix=" FMT "uri=" http://java.sun.com/jsp/jstl/fmt "%><%@ taglib prefix=" FN "uri= "Http://java.sun.com/jsp/jstl/functions"%><%string path = Request.getcontextpath (), int nminutes = * 7;date D = new Date (); String moddate = d.togmtstring (); String expdate = Null;expdate = (new Date (D.gettime () + nminutes * 60000)). toGMTString (); Response.setheader (" Last-modified ", moddate); Response.setheader ("Expires", expdate); Response.setheader ("Pragma", "public"), Response.setheader ("Cache-control", "public");%>
In particular, note that the value of Cache-control and the value of pragma are "public".
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Resolve an issue where HTTPS cannot be cached