Framework to save settings in cookie