From de9bbfdb8f0d3b366e76a5cc775690f7315c740f Mon Sep 17 00:00:00 2001 From: 53hornet Date: Fri, 10 Dec 2021 23:17:42 -0500 Subject: feat: custom routing, no required php in posts --- posts/2021-10-22-forced-downloads-in-the-browser-via-http.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'posts/2021-10-22-forced-downloads-in-the-browser-via-http.php') diff --git a/posts/2021-10-22-forced-downloads-in-the-browser-via-http.php b/posts/2021-10-22-forced-downloads-in-the-browser-via-http.php index bd411e5..2d5dcf4 100644 --- a/posts/2021-10-22-forced-downloads-in-the-browser-via-http.php +++ b/posts/2021-10-22-forced-downloads-in-the-browser-via-http.php @@ -1,10 +1,5 @@ - +

Forced Downloads in the Browser Via HTTP

+

Recently a coworker was tasked with adding a "file download" link to a web page. The file in question was being generated dynamically by the server, but we really wanted to make sure the file didn't get rendered in the user's tab. Here's how you can leverage HTTP headers to do that (and some alternative ways you shouldn't!) -- cgit v1.2.3