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

150
Visualizações
Any way to test for 404 errors at different domains from Google Chrome extension code?

My wife has over 12k Pinterest pins and there are many that resolve to 404 errors. I thought it would be simple to just create a chrome extension she could run that would get the pins, then I would test the URLs for 404 errors and then perform a delete.

Creating the plugin wasn't difficult but of all things, I am getting hung up on being able to determine whether the remote URL is a 404 due to CORS issues. Using fetch with a mode of no-cors does not error but it doesn't return me anything that I can use to determine whether the link is valid or not. I understand the purpose of CORS, but I'm just surprised that there isn't a way to tell from javascript whether or not a domain is valid.

I've seen some approaches where it was stated to use a proxy which I guess you append the headers with, however I thought I would see if there was any creative means of telling whether an endpoint is even existent or not. I'm really only interested in capturing the broken links so I can then go about deleting the pins programmatically. I was going to go about testing whether I could use an iframe to assign src to the url and see if I'm able to extract any more info that way, but figured I would post here to see if there are any other creative approaches. I also tried performing a fetch for favicon.ico, thinking it would get around CORS due to it being an image and not the full page, but this didn't work as well as I was hoping.

If you have any ideas, please let me know. Thanks!

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