I dynamically generate png files which after clicking “generate” button appears “under” link.
"generate button : click" ---> <a href="new_generated.png">DOWNLOAD</a>
After clicking link DOWNLOAD I wish content of link(in my case png) start download – no open in another window but download!
I am using cakePHP. Can I please for help?
Alternatively if you are using Apache web server and have mod_headers enabled you can use an .htaccess file to force download of the png files.
Create a .htacess file and place it in the directory where your png files are being generated/downloaded from. In that file put this: