This is a migrated thread and some comments may be shown as answers.

[Solved] Caching problem?

3 Answers 310 Views
Window
This is a migrated thread and some comments may be shown as answers.
terrysmith
Top achievements
Rank 1
terrysmith asked on 10 Mar 2008, 10:36 PM
After migrating our RadWindows to Prometheus I'm experiencing a problem I think is related to caching.

I have a window template defined on the master page, and two buttons on a web page, each of which launch a different dialog using that window template. When I click one and then the other I can see the previous dialog in the RadWindow for a split-second (along with its title in the title bar) before the new dialog paints itself. I believe it's displaying a cached copy of the previous window.

The HTML pages that display as RadWindow dialogs each inherit from a dialog master page with the following in the <head> tag:
    <meta http-equiv="CACHE-CONTROL" content="NO-CACHE" />
    <meta http-equiv="PRAGMA" content="NO-CACHE" />
    <meta http-equiv="EXPIRES" content="-1" />

So they shouldn't be cached, but it appears like they are. Can I do something to eliminate the refresh issue? Is there a way to not display the RadWindow until its finished downloading?

Thank you,
Terry

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 11 Mar 2008, 12:54 PM
Hello Terry,

You can try hooking to the OnClientPageLoad event and to show the RadWindow in the visible area only when it is completely loaded. The idea is to show the window outside of the visible area - you need to set KeepInScreenBounds to false, and when the content page is loaded to show the RadWindow in the center or in the desired position on your page.

For convenience I attached a small sample that shows this approach in action - I hope it will help.



Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
terrysmith
Top achievements
Rank 1
answered on 11 Mar 2008, 03:25 PM
Thanks for the help.

I found that by setting these two properties on the RadWindow definition on the MasterPage that the problem mostly goes away:

ReloadOnShow="true" ShowContentDuringLoad="false"

The only exception is that the title from the previous dialog still displays until the new one loads. I've tried setting document.title = "" in the onUnload event but that didn't resolve it.

Any ideas?

Thanks again,
Terry
0
Georgi Tunev
Telerik team
answered on 11 Mar 2008, 04:03 PM
Hi Terry

If the page that you are displaying in the RadWindow has a title set in the head section, RadWindow will automatically display it.
As for the original problem, I noticed that I missed some information that may be useful - I apologize for that.
The caching of the RadWindow is by design - when a RadWindow is closed, its object is not destroyed and the window remain hidden on the page. You can control this behavior by using the DestroyOnClose property. If set to true, the RadWindow object will be destroyed, but please note that in such case you will not be able to open that RadWindow again until the page is reloaded.

I hope this helps. If you still experience problems, please open a support ticket and send us a working project where we can examine your exact setup. Once we have a better view over your logic, we will do our best to provide an appropriate solution.



Kind regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
terrysmith
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
terrysmith
Top achievements
Rank 1
Share this question
or