isolate useragent checking

isolate user agent checking per Comment 2 in bug1019002