Add "setUserAgent" method to example#194
Conversation
Google checks on user agent, otherwise it will show another version of Google
|
You can see in my PR 137 that I changed the page to a static page served as data URI. |
There was a problem hiding this comment.
Hi @daannijkamp thanks for raising this PR. I'm not sure I agree with it. While it's useful to be able to set the user-agent for testing one's own websites (which is why we have the setUserAgent() method), I don't think we should actively encourage faking user-agent's in our examples. We want Chromeless to be a force-for-good and therefore not, by default, hide our identity as an automated user.
@elisherer the scripts in the examples/ folder are not intended to be unit tests. They're standalone examples of various use-cases.
|
@adieuadieu It was not my intention to fake a User-Agent. If Google doesn't recognise the User-Agent, (at all), it will show a version of Google that is different than a normal user will get. This makes the example somewhat confusing. Maybe you can change the default User-Agent to something like |
|
@adieuadieu , you are right, I misread the PR. |
|
I'm not sure that gating off the |
|
@joelgriffith we already support setting user-agent with the |
|
@adieuadieu My advice is:
|
|
@daannijkamp changing the default user agent to |



Google checks on user agent, otherwise it will show another version of Google