Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

navigator.resetToPage does not request the page

  • I’ve tried python SimpleHTTPServer and mongoose but when looking at the access logs when I do

        const navigator = document.querySelector('#navigator');

    No request for the page is made to my HTTP server and an older copy of the page is shown…

    Is onsen UI caching it somehow? if so how do I clear this cache? (I don’t even see a 300 response from the HTTP server)

    I have even tried writing my own HTTP server that never responds with 300 but still something is caching the page. Changing the port of my HTTP server does fix it.

  • administrators

    If you’ve already put the page on the page stack when you call resetToPage then Onsen will use the version already loaded.

    Otherwise, Onsen shouldn’t be doing any caching between sessions, but your browser might be. Try opening a new private browsing window to check if it’s your browser that is caching it.

    If you need a way around this, it would help to know what your use case is.

  • Thanks for the reply. Yeah the HTTP server I was using (mongoose) did not set a cache control header. So chrome decided that it could cache the requests…

    Switching to nginx with the “expires -1;” setting has fixed this.