Only perform user agent checks once