Loading external HTML page



  • Hello, I am trying to load an html page from a server and render it in the mobile. I control how the page renders from the server, however onsen keeps loading the old rendered page. How do I prevent it from doing so?



  • @barakatp, it is probably being cached by your web browser. Try adding a meta in the <head> section to disable caching.

    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    

  • Onsen UI

    @barakatp If what @jamal said doesn’t work, try ons._internal.templateStore.set('yourTemplateUrl', null); before pushing it. We can add some aliases if that works.



  • @Fran-Diox said:

    ons._internal.templateStore.set(‘yourTemplateUrl’, null);

    Thank you for your reply, it worked


Log in to reply