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

95
Visualizações
Different behaviours for CRA SPA when downloading PDF

I have created an SPA through CRA, and a modal of the app runs the following command to download a PDF generated from SSRS when a button on it has been clicked.

window.open("SSRS server URI that generates a PDF", "_blank")

Now, when the code above is run with npm start (development mode) along with the backend that is running on the ASP.NET Core web server, the new tab is opened and the PDF is downloaded when the button is clicked. Regardless the number of time I clicked the button, the tab is opened and the PDF is downloaded, even if the PDF is the same.

However, when the code is built with npm run build (production mode) and served by the ASP.NET Core web server, the new tab is opened, but the PDF is downloaded during the first time, subsequent click on the button opens the new tab without the PDF being downloaded. Interestingly, this happens on Chrome, but not Chromium Edge.

Does any one have any idea what could have caused such odd behaviour when running the SPA in production mode?

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