Search code examples
templatesmeteoriron-routerpage-caching

Does template caching exist in Meteor or Iron-Router?


Is there any way I can cache templates or pages in Meteor or Iron-Router?

I'm trying to build a mobile application and the issue is that scroll position is lost and DOM elements need to be recreated on page changes.


Solution

  • So your question is not very clear but basically you are having trouble with scroll position?

    Quick answer is no there is no cacheing of elements because Iron Router (IR) is destroying them, which is a good thing. Meteor itself is a single page app so the scroll position can be controlled by IR.

    See if this package will help: https://atmospherejs.com/okgrow/iron-router-autoscroll

    Again it is hard to give a clear answer because your question is to vague.