Reputation: 1
Do anyone know who can I get the HTTP_USER_AGENT of Testing Tools like GTmetrix and pingdom. To be more precise please check this link which get the User agent of Google Pagespeed => PageSpeed Insights 99/100 because of Google Analytics - How can I cache GA?
I want to get same thing for GTmetrix and Pingdom. Any help is appreciated.
Thanks
Upvotes: 1
Views: 1867
Reputation: 602
This regex matches the UA as of the time of this answer:
// javascript PSI regex
navigator.userAgent.match(/nux.*oto\sG|x11.*fox\/54|x11.*ome\/39|x11.*ome\/62|oid\s6.*1.*xus\s5.*MRA58N.*ome|JWR66Y.*ome\/62|woobot|speed|ighth|tmetr|eadle/i)
// taken from WP plugin Fast Velocity Minify
Hope it helps 🙌🏻
Upvotes: 0