cpreferences with ajax