Hello fellow Ember enthusiasts
As I’m developing a big web application which is going to load the needed precompiled Handlebars templates from the backend web server on demand, I can’t rely on browser caching. So, everytime the user is going to refresh his browser, the client would have to load all previous requested, saved and used templates again from the server which I want to avoid.
Is there a possibility to store/restore the
Ember.TEMPLATES object with all its content to
window.localStorage? Will I have to implement my own solution to achieve this and if so, could someone assist me / give me some advice how to solve this problem? Or are there any arguments against my theory so that I should rethink the whole thing?
Actually, I can’t deliver the whole bunch of precompiled templates to every user on every login, because the app will consist of several hundred templates while the average user (if there will be any ‘average’ user) will need round about 20% of the application the whole day. Unfortunately it’s not possible to serve the 20% for every user, because the area of the app which is used does also differ from user to user… hard to explain but I guess you can imagine what I want to express (hopefully)
Here’s the link to the topic I started over at Stackoverflow.com: http://stackoverflow.com/questions/17144842/ember-js-is-it-possible-to-store-restore-ember-templates-in-window-localstorag
Thanks to everyone who took his time and read through this text - every piece of input/help is welcome!