-3

How to force to text (.txt) file to download instead of opening into browser window.

This is simple html link out.print("<a href =http://localhost//output/Output.txt">");

putvande
  • 15,068
  • 3
  • 34
  • 50
Code Hungry
  • 3,930
  • 22
  • 67
  • 95

1 Answers1

1

Your server needs to add a header to the response:

Content-disposition: attachment

fred02138
  • 3,323
  • 1
  • 14
  • 17