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

Force Reload with app.navigate

3 Answers 625 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 2
Shawn asked on 17 May 2014, 07:27 AM
I am trying to voce a reload of an html page when calling app navigate.

I build a html file dynamically on local storage and it changes for various reasons.

I have tried the following:

var filepath = "/file/some.html?var=" + new Date().getTime();

app.navigate(filepath);

I have also put javascript in the header:

document.location.reload(true);

I have also put in the meta tags in the header for no-cache, etc. with no luck.

Only when I shut the app down and restart it does the cache seem to be cleared and the page reloaded.

Any help would be great.

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 2
answered on 17 May 2014, 09:06 PM
Going to add some more clarification to this question.

It seems that Kendo is holding the old stuff in the DOM so how can I refresh the DOM or even reset it.

I am using Cordova so in the index.html where i download the new files if there was a way to force a refresh / reset of the DOM in some way to get Kendo to re-read the files during an app.navigate.

0
Kiril Nikolov
Telerik team
answered on 20 May 2014, 07:34 AM
Hello Shawn,

Did you try setting the Kendo UI View reload option? If you set it to true every time you navigate to a certain view, the contents will be reloaded for the server. Here is a documentation article about it:

http://docs.telerik.com/kendo-ui/api/mobile/view#configuration-reload

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Shawn
Top achievements
Rank 2
answered on 20 May 2014, 02:59 PM
let me give that a shot, we did figure out a way to force the reload by recalling index.html in our cordova app using windows.location and that seemed to force kendo to re-read the files from local file system.
Tags
General Discussions
Asked by
Shawn
Top achievements
Rank 2
Answers by
Shawn
Top achievements
Rank 2
Kiril Nikolov
Telerik team
Share this question
or