-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
  • 14,686
  • 3
  • 31
  • 50
Code Hungry
  • 3,750
  • 22
  • 64
  • 92

1 Answers1

1

Your server needs to add a header to the response:

Content-disposition: attachment

fred02138
  • 3,303
  • 1
  • 13
  • 17