The problem of caching when using the JavaScript ShowModalDialog () function to display an ASPX page
Source: Internet
Author: User
function | cache | problem | show | page with JavaScript showmodaldialog () function to display an ASPX page, there is a problem with caching, the first time showmodaldialog to see the normal content, And the second start to see the content of the page is the first time to see the content, that is, the page is directly from the cache, rather than to the server to take, and my program has not let this page forever cache
Two solutions:
Method One: First write an HTM page, inside nested a iframe,iframe src is aspx page, then ShowModalDialog () page is this HTM page, rather than the previous ASPX page, so there is no caching problem.
Method Two: Write a sentence in the Page_Load () of the aspx page response.expires =-1; This means that the page expires immediately, so there is no need to nest an HTM page.
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.