framework7

Open full view…

Back link always uses cached copy of page

gregorscott
Thu, 22 Jun 2017 17:32:01 GMT

I've got a couple of links that look like this: --- <a href="index.html" class="back link backlink" data-reload="true" data-ignore-cache="true"> --- Also, when I initialize F7, I set the following: --- var myApp = new Framework7({ material: true, precompileTemplates: true, template7Pages: true, cache: false, cacheDuration: 0, preloadPreviousPage: false, modalTitle: 'MyTracker' }); --- The problem is, if I click on the Back link, it uses a cached version of the page. I know this because my onPageInit() never gets fired for the page I'm trying to go back to. Are pages navigated to by the Back button always pulled from the cache?

Vladimir Kharlampidi
Fri, 23 Jun 2017 07:58:47 GMT

Use data-force true to reload it

gregorscott
Fri, 23 Jun 2017 15:55:16 GMT

Thanks. I actually ended up turning off Template7Pages (since I read that setting forces caching to be turned on) and changed my onPageInit() calls to onPageBeforeAnimation(), which gets called. I also kept the data-ignore-cache on each link.

TriSys
Fri, 18 Aug 2017 10:35:22 GMT

Where can I find documentation on "data-force"?

froamer
Mon, 21 Aug 2017 11:33:08 GMT

@TriSys I found a reference to it here: http://framework7.io/docs/pages-ajax.html#load-pages-using-additional-navigation-options

TriSys
Tue, 22 Aug 2017 07:51:58 GMT

Thanks froamer.