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.
Helper house www.bkjia.com
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 or the window. location. replace method on the front-end for navigation.
Method 2: Disable 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.