< book >
The Ember.Application instance is not available from ‘my-app-name/app’ (the export from that file is a class not an instance).
In 0.0.46 you can access the running app instance at ‘window.MyAppName’, but that is no longer available on master (which will be 0.0.47).
I would definitely suggest just setting window.location to ensure all in memory data is cleared. App.reset() will definitely clear the applications container instance, but it will never clear all possible state. What if you used local closure scoped variables to stash things (wouldn’t be reset with app.reset)? What if your stashing data on the class prototypes (won’t be reset)? What if your application instance itself contains user state information (won’t be reset)?
As you see above App.reset cannot be a silver bullet, because there are many things that we programmers do to stash state all over the place. The only way to guarantee all of those things are reset/cleared is to reset the window.location to your logout page. Your assets should all still be cached, and the page will update quickly, but you can be as certain as possible that you are not leaking information.
< / book >