ajax调用异步问题

i just have a problem with the async mode. in my ajax call i create a pdf, which takes a while (10 - 45 seconds) and in the success section of ajax i call window.open('path of pdf') to show the created pdf.

my issues:

  1. When i call the ajax in the sync mode, the function dies in Safari and no popup appears. due to, the request tooks too long...

  2. When i call it in the async mode, everything is fine but the popup blocker blocks the pdf. in the sync mode the popup appears, though the popup blocker is active.

Check status with setInterval method every few second.

  • if status is creating show preloader
  • if status is rejected show message about error
  • if status is created redirect to page that you want

What kind of popup blockers can block popups created by JS/HTML?