Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - force image to download
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedforce image to download

 Post Reply Post Reply
Author
RCorr View Drop Down
Groupie
Groupie


Joined: 21 January 2003
Status: Offline
Points: 126
Direct Link To This Post Topic: force image to download
    Posted: 05 July 2007 at 9:47pm
Hi,

I am creating an intranet page for my company where they can download images of the company logo and partners’ logos.  Is there a way to force a save dialog box to open up instead of the image opening up in a browser.  My page is in html format so no server-side scripting is use. 

When I search the web all I get are examples in PHP and get the following:

header("Content-Type: application/force-download");  

I experiment this in a META tag:

  <META http-equiv="Content-Type" content="application/force-download">

 but it didn't help.  Does anyone know of a solution?

Thanks in advance,

RCorr


Back to Top
MortiOli View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 May 2002
Location: United Kingdom
Status: Offline
Points: 514
Direct Link To This Post Posted: 11 July 2007 at 1:00pm
Not off the top of my head, but you could ZIP them up, which will force it to download rather than just open.
Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Direct Link To This Post Posted: 11 July 2007 at 6:05pm
you could rename it with an un-recognized extension and inform the users to rename it after downloading...
Back to Top
MortiOli View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 May 2002
Location: United Kingdom
Status: Offline
Points: 514
Direct Link To This Post Posted: 12 July 2007 at 1:26pm

Just found this (not tested though);

http://www.irt.org/script/764.htm

Back to Top
RCorr View Drop Down
Groupie
Groupie


Joined: 21 January 2003
Status: Offline
Points: 126
Direct Link To This Post Posted: 19 July 2007 at 9:25pm
Thanks for all of your suggestions.  I prefer not to change the extension.  I visited the page that MortiOli suggested and read that the script only puts the image into cache and instead of prompting a dialog box as it mentioned on the web site. 

I read the page comments and found that I need to implement the mime header application/octet-stream to be able to force the image to download.  How do I go about adding this to my web page?

Thanks in advance,

RCorr
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.