Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

89
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!