John's profileJohn BarshingerPhotosBlogLists Tools Help

Blog


    March 17

    showModalDialog -- caching problem

     

    Any place where you are using something like “window.showModalDialog” is likely to exhibit a caching problem. Turning off caching on the called pages does not seem to always work. The only way I have been able to get 100% success (so far) is to add an extra parameter to the URL being called and passing a javascript timestamp as the value for this extra parameter. Something like this:

     

        function AddCredit(y)

        {

            return window.showModalDialog("x.aspx?currentIDs=" + y+ "&TimeStamp=" + new Date().getTime(),

                null, 'status:no;dialogWidth:450px;dialogHeight:300px;dialogHide:true;help:no;scroll:no');

        }