server-side solutions
Posted Jan 9, 2007 7:51 UTC (Tue) by
ldo (subscriber, #40946)
In reply to:
server-side solutions by roelofs
Parent article:
A Firefox PDF plugin XSS vulnerability
Web browsers don't seem to pay any attention to a "Content-disposition: attachment" header line. The only reliable way we found to stop downloads from displaying in the browser was to add an ONCLICK attribute to the link, something like this:
<SCRIPT>
function PleaseSaveToDisk()
{
alert("Please right-click and save the item to disk.")
return false
}
</SCRIPT>
<A HREF="link-to-whatever" ONCLICK="return PleaseSaveToDisk()">
(
Log in to post comments)