Meteor - delete from session on page change/reload -


how deal "volatile" values in session? example, hold form validation errors in session. don't want them there on page refresh or after changing pages.

session variables not survive manual page refresh (ctrl+r). if want variables cleared after page transition put clearing code in router or in template's destroyed callback (i typically choose latter). example if have template called signin do:

template.signin.destroyed = function(){   session.set('signinvalidationerrors', null); } 

whenever naviate away signin page (the template destroyed), clear signinvalidationerrors.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -