Want to download a file instead of rendering in a browser? Append "Content-Disposition:attachment;filename='foo.bar'" to the header. One may also specify "Content-Disposition:inline;filename='foo.bar'" to render the file as usual, yet provide for a default filename in the "Save As" prompt.
This is according to RFC2183 and RFC6266.
Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts
Saturday, November 10, 2012
Friday, October 26, 2012
img oddities
Something to note today: Make sure to define img.onload before img.src in javascript. Otherwise certain browsers may behave erratically. Apparently there isn't an official spec on this, but it's mentioned over at StackOverflow.
Subscribe to:
Posts (Atom)