Cache problems when I use the showmodaldialog () function of JavaScript to display An ASPX page

Source: Internet
Author: User
When I use the showmodaldialog () function of JavaScript to display An ASPX page, there is a cache problem. The first time I showmodaldialog saw normal content, the content of the page that is viewed for the second time is the content of the first time. That is to say, the page is obtained directly from the cache, rather than from the server. Program This page is never cached forever.
Two solutions:
Method 1: first write an HTM page with an IFRAME embedded in it. The SRC of IFRAME is the ASPX page, and then the showmodaldialog () page is the HTM page instead of the previous ASPX page, in this way, there is no cache problem.
Method 2: write a sentence in page_load () of the ASPX page. Response. expires =-1; This means that the page will expire immediately, so there is no need to nest Htm Page.

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.