window.showModalDialog Two load Problem Clear Cache method _ Practical Tips

Source: Internet
Author: User
One of these things happened today,
Copy Code code as follows:

var frmheight = 352;
var frmwidth = 508;
var frmtop = (window.screen.height-frmheight)/2;
var frmleft = (WINDOW.SCREEN.WIDTH-FRMWIDTH/2);
var url = "Choseperson.aspx";
var parameter = "Dialogheight:" + frmheight + "Px;dialogwidth:" + frmwidth + "Px;dialogtop" + frmtop + "Px;dialogleft" + F Rmleft + "px;scroll:0;status:0;reziable:1;";
var rval = window.showmodaldialog (URL, "", parameter);
window.showModalDialog ()//first load is to walk Page_Load () method, the second load will not go Page_Load ();

Specific reasons:
Is the problem of caching, the first time you open the window, the second browser did not fetch data from the server, and directly found the file you have downloaded,

Final Solution:
1. Set browser properties
Change the settings of IE to try again, Internet Options-> General-> Settings-> Check every time you visit this page
(The advantages of total station reload, to solve the problem)

2. Add the cache to clear the previous cache
Add cache, clear previous data, prevent not loading page
<%@ OutputCache duration= "1" varybyparam= "None"%>
(The advantages are only for the required interface Plus, save time)
New

3. (7/10 test found IE7 does not support the 2nd cache format) No way. Only modify the purge cache code
Join in <meta http-equiv= "Pragma" content= "No-cache" >
<meta http-equiv= "Cache-control" content= "No-cache" >
<meta http-equiv= "Expires" content= "0" >

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.