Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the name of the Google PageSpeed User Agent?

Tags:

This page indicates that it uses a custom user agent but it does not mention the name. I would like to be able to run some logic if the user agent is from PageSpeed. What is the name of the Google PageSpeed user agent?

like image 498
Matty B Avatar asked May 06 '13 16:05

Matty B


2 Answers

The information in other answers is outdated: currently, Google PageSpeed does not pass the «Google Page Speed Insights» string in its User-Agent HTTP header, it passes the «Chrome-Lighthouse» string instead.
An example:

Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36(KHTML, like Gecko) Chrome/69.0.3464.0 Mobile Safari/537.36 Chrome-Lighthouse

Please note that the string is exactly «Chrome-Lighthouse» even if you run Google PageSpeed in other browsers (e.g. Firefox).

like image 139
Dmitry Fedyuk Avatar answered Oct 10 '22 11:10

Dmitry Fedyuk


I created a script, it returns two USER AGENT one for desktop and other for mobile, these are

for MOBILE:

Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko; Google Page Speed Insights) Chrome/27.0.1453 Mobile Safari/537.36

FOR DESKTOP

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko; Google Page Speed Insights) Chrome/27.0.1453 Safari/537.36

like image 39
ghmulchandani Avatar answered Oct 10 '22 10:10

ghmulchandani