I just noticed in my meteor app that the session variables are getting cleared on page refresh. So
Meteor.Session is only for the client-side. It's a JavaScript global object in your application. If you refresh the page it's wiped out. Your session is stored in client-side localStorage, https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage. Meteor does not use cookies for Session, https://www.meteor.com/blog/2014/03/14/session-cookies.
You would need to explain more what you are trying to accomplish. I use Meteor.Session once the page is loaded, and not for many things, but to get my initial state of things, my URLs contain enough info to set initial state.
With Meteor you ideally do not want to refresh the browser. Everything happens or should happen with AJAX and HTML5 push state ideally and Meteor's reactiveness.
You should read their documentation. Here's the section on Session, http://docs.meteor.com/#session
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With