Skip to content

Commit

Permalink
Merge pull request #10 from RVXD/patch-1
Browse files Browse the repository at this point in the history
Add extra headers to prevent caching
  • Loading branch information
lekoala committed Nov 1, 2022
2 parents ca7ee42 + 0ff4dbd commit 4ed6bff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ExcelGridFieldExportButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ public function handleExport($gridField, $request = null)
$func = $this->afterExportCallback;
$func();
}


header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="' . $fileName . '"');

Expand Down

0 comments on commit 4ed6bff

Please sign in to comment.