Although the author of this article is very simple, I believe that using these texts can help you understand ASP. NET page caching.
I encountered a problem a few days ago and was puzzled. Later, I checked some materials and found some ideas. Record your problems and hope to help other garden friends.
This is the case. My ASP. NET page was not updated when I accessed it again using window. open navigation. Specifically, I did not access the server when I accessed it again. However, this problem does not occur on my machine, and other machines in the project team have this problem. At that time, I was so depressed that it was not convenient to debug. At last, I output a lot of alert on the page. After several tests, I found the problem.
The main problem is that the page is cached by IE. When the server is updated, IE does not check the page. My machine is okay because I set ieto check for updates every time I access the page, and they automatically check for updates. Because I used the front-end window. open Method to navigate to the page again, this method cannot make the browser's automatic check take effect.
The description above is messy. I wonder if you can understand it. Let me explain the specific solution.
Method 1: Use the Response. Redirect method on the server side for navigation, or use the window. location. replace method on the front end.
Method 2: Disable ASP. NET page caching.
I recommend method 2 when necessary. Because the browser settings cannot be controlled during development. If you set Internet Explorer to never check and update the cache, it is difficult to avoid this problem. Therefore, use method 2 to make the Temporary Folder of Internet Explorer non-existent page files.
In addition, whether to disable the page cache depends on the actual situation. At first I thought that the page cache was only cached on the server, and then I read a blog
The significance of cache is large. In many cases, the pressure on the server can be greatly reduced. However, in the development process, we need to focus more on the needs and do not blindly set any attributes.
Original article title: Learning of asp.net page Cache
Link: http://www.cnblogs.com/417533880/archive/2009/10/09/1579629.html
- Disable ASP. NET midway through to check whether it affects server execution
- Disable the ASP. net bug in the browser sessionfor 1 minute
- Overview ASP. NET page framework
- Describe ASP. NET page forms
- ASP. NET page Object Model