Page cache troubles

Source: Internet
Author: User

When the system is launched, issues that are not noticed during normal development come one after another...

Today, I encountered a problem. Because of the page cache problem, the user did not set the browser to clear the page cache. As a result, the ticket numbers of many application forms are the same...

The final problem is solved. Although it is not solved, I would like to take this opportunity to learn how heroes solve the cache problem.

1. disable Client caching

<Meta HTTP-EQUIV = "Pragma" content = "no-Cache">
<Meta HTTP-EQUIV = "cache-control" content = "no-cache, must-revalidate">
<Meta HTTP-EQUIV = "expires" content = "wed, 26 Feb 1997 08:21:57 GMT">

2. Disable caching on the dynamic web page of the server. Add the following content:

Response. setheader ("Pragma", "No-Cache ");
Response. setheader ("cache-control", "No-Cache ");
Response. setdateheader ("expires", 0 );

The first two have been tried .... Finally, my colleagues used the filter to solve the problem.

(Httpservletresponse) Response). setheader ("Pragma", "No-Cache ");

(Httpservletresponse) Response). setheader ("cache-control", "No-Cache ");

(Httpservletresponse) Response). setheader ("expires", "0 ");

I didn't think of filters, but I still learned something.

Page cache troubles

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.