treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Download image without opening new tab

  • Hi everybody. I have some problem on Joomla!. When i give a link to image, browser opens it in new window, but i want to download it. I read some about "Content-description" to send it each time to header. I don't know how to implement it. Also i found some PHP scripts like making download.php but it has security problems. I'm using Joomla!. Any idea and help is appreciated.

  • Have you tried this? Note: This is obviously only if you're using an Apache server (there's no .htaccess on Windows servers...)

  • This is nothing to do with joomla! It's a php thigh or .htaccsess thing ill find something soon

  • I've found something php here

  • Thanks @Htmlmainiac, that woked. I created .htaccess on my root folder and pasted codes. In chrome, it directly downloads, In Firefox and Opera, it prompt "Save as.." tab. Anyway, cool. Cheers :)

  • Thanks @jcodex for the nice feedback. It was only a google search.

  • Actually, it didn't work on Android. Especially Dolphin browser :(