304 errors and problems with ajax request