cookie,session,trigger and errorhandling practice