Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • is there a way to set a file name this way? Commented Mar 30, 2022 at 14:05
  • @Zoid Since this directly opens an url, only the server can send approriate Headers to set a filename for the download.
    – mondjunge
    Commented Apr 1, 2022 at 10:11
  • 1
    Use the Content-Disposition header to set a file name (e.g., Content-Disposition: attachment; filename="sample.csv")
    – Sean
    Commented Apr 12, 2022 at 21:59
  • This might cause Session problems in mobile Safari Browsers, using window.open(url, '_parent'); resolved the issues.
    – mondjunge
    Commented Mar 21 at 16:09