Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

250
Visualizações
Redirect in chrome responsive simulator changing user agent

When I do a request to a page that returns a 302 redirect in the chrome responsive simulator I see a new request with a different user agent string.

Here you see the user-agent with 'Android 7.1.1' enter image description here enter image description here

For the next request after the 302 redirect the user-agent string is changed. enter image description here

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The issue you reference has nothing to the .NET server. It has no way to return a user-agent string for a browser. The user-agent string is set by a browser only. But your string was changed. Checked now Chrome (v95 x64), Opera (on Chromium v94 x64), Edge (v95 x64), and FireFox (v94 x64). For a redirecting link, I used HTTP://google.com (yes, not HTTPS - to get the HTTPS redirect as 307 Inner redirect). All initial user-agents for speed and unification were set to the same 'iPhone 5/SE'. My results are below.

Chrome.

HTTP request goes as phone Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1.

HTTPS goes as Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36. User-agent changed. Issue. The same case you highlighted.

Opera (almost, another Chrome version). HTTP request goes as phone. HTTPS goes as phone. No user-agent change. All works as expected.

Edge (almost, the same Chrome version). The same case as on Chrome. Ding!

FireFox (different engine). HTTP doesn't go - HTTP/3 in use that starts with HTTPS initially. Not an example here.

There is a similar issue in a Chromium bug list. But it is not like yours. https://bugs.chromium.org/p/chromium/issues/detail?id=1234461&q=User-agent%20string&can=2

Anyway, it looks like you found a Chromium issue on v95.

My greetings! It's your right to report the issue.

As an option, it is possible to use new User-Agent Client Hints headers Sec-CH-UA* on server: Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform. But these extensions are new. Most mass modern browsers are using it but not Firefox or Safari. Just set up your server to request them. If the UA string is in use at a client, that it is better to get proper values via JS: navigator.userAgent, navigator.appVersion, and navigator.platform.

It is planned to get rid of already not clear UA string in the future.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda