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

234
Visualizações
Why do browsers use `Accept: */*` for <script> tags, instead of application/javascript?

Firefox and Chrome would claim they prefer a html or xml document when doing the request for the page, like this (from Chrome):

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9

and text/css for <link rel="stylesheet" type="text/css">, like:

Accept: text/css,*/*;q=0.1

But when it comes to <script src>, it becomes

Accept: */*

without claiming application/javascript despite it will accept only javascript.

Why would it behave like that ?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It reduces the size of the Accept header and thus saves some bandwidth leading to a performance boost.

See bug 170789

Also, it helps to minimize errors on sites expecting headers of fixed maximum length.

See IE and the Accept Header (IEInternals' MSDN blog)

about 4 years ago · Juan Pablo Isaza 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