summaryrefslogtreecommitdiff
path: root/posts/2021-10-22-forced-downloads-in-the-browser-via-http.php
diff options
context:
space:
mode:
Diffstat (limited to 'posts/2021-10-22-forced-downloads-in-the-browser-via-http.php')
-rw-r--r--posts/2021-10-22-forced-downloads-in-the-browser-via-http.php9
1 files changed, 2 insertions, 7 deletions
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 @@
-<?php
-$title = "Forced Downloads in the Browser Via HTTP";
-if (isset($early) && $early) {
- return;
-}
-include($_SERVER['DOCUMENT_ROOT'] . '/includes/head.php');
-?>
+<h1>Forced Downloads in the Browser Via HTTP</h1>
+
<p class="description">
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!)