HTTP does not allow you to do what you want to do (200 + 300). You can do this at the client level, but using _target + JavaScript (or just JavaScript).
<a href="/path/to/download/file" target="downloadIframe">Download file</a> <iframe id="downloadIframe"></iframe>
Combined with some JavaScript:
var slice = Array.prototype.slice; var links = document.querySelectorAll("[target='downloadIframe']"), iframe = document.getElementById("downloadIframe"); slice.call(links).forEach(function(link) { link.addEventListener("click", reloadPageOnIframeLoad); }); function reloadPageOnIframeLoad() {
Sean vieira
source share