How do you persuade a browser to ‘Save-as’ a filename with a leading period?
Is there some way to persuade major browsers to accept a content-disposition
filename with a leading period? For example, I want a browser to pop up a ‘Save as’ with a suggested filename of .gitconfig
. The obvious answer is
HTTP: Under what circumstances does `Content-Disposition:attachment` produce a ‘Save as’ dialog?
In principle, an HTML response can set Content-Disposition
to attachment
, and the browser should then present a ‘Save as’ dialog, to allow the response body to be saved at the client (see Content-Disposition at MDN).