• 0

Link to Website that requires download?


Question

Hi everyone.  On our website, I want to link to an .htm page on a government site, that for whatever bizarre reason insists on downloading the .htm file before opening it...  I would like to avoid this download for people visiting the web page and instead load it in the browser (It does open in the browser after the unnecessary download after all...).

 

Does anyone have any suggestions for this?  As a website visitor, I don't like downloading things to begin with, and shudder to encourage my visitors to do so...

 

This is the link to the page (Insists on downloading):

 

http://www.portal.state.pa.us/portal/server.pt?open=18&objID=482402&mode=2

 

Thanks so much for your help.

-Matt-

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

The response header contains

 

(Status-Line)    HTTP/1.1 200 OK
Date    Thu, 20 Jun 2013 16:14:41 GMT
Server    Microsoft-IIS/6.0
X-Powered-By    ASP.NET, ASP.NET
X-AspNet-Version    2.0.50727, 1.1.4322
Content-Disposition    attachment; filename=ASBCONTR.htm
Content-Language    en
PTGW-STREAMING    Yes
Content-Encoding    gzip
Cache-Control    private
Expires    Thu, 20 Jun 2013 16:14:41 GMT
Vary    Accept-Encoding
Content-Type    text/html
Content-Length    183975

 

The Content-Disposition being attachment the browser will open a download dialog window. Not sure you can bypass this.

Link to comment
Share on other sites

  • 0

Thanks everyone for your help.  It's rather annoying that they would force a download like that.  There's no reason or benefit...  But I appreciate you telling me why it's doing that, and I will look into loading it in an iFrame as well.

 

Thanks Again,

Link to comment
Share on other sites

  • 0

They've just misconfigured their IIS instance.

 

They've set it to not server .htm files. If they added an l or added .htm to the config, I bet it would work fine >.<

 

Regarding solving the issue, why not just rip the code out and put it into your own page with an explanation.

 

Failing that, iFrame would appear to be the best (and worst tbh) answer.

Link to comment
Share on other sites

  • 0

They've just misconfigured their IIS instance.

 

They've set it to not server .htm files. If they added an l or added .htm to the config, I bet it would work fine >.<

 

Regarding solving the issue, why not just rip the code out and put it into your own page with an explanation.

 

Failing that, iFrame would appear to be the best (and worst tbh) answer.

Iframe is horrible indeed but we got no other choice :/

Link to comment
Share on other sites

  • 0

May I make a possible suggestion, and please don't shoot me down...

 

1) Their IIS is badly setup.

2) iFrame isn't great...

 

Why not page-scrape?  Load it in vial PHP and present it as if on your site?

 

Or - open in another window.  2 frames - 1 small at the top saying "Presented from {Your company}" and then the rest of the page with frame of their content.

 

Sorry, ###### suggestions but trying to help :)

Link to comment
Share on other sites

  • 0

May I make a possible suggestion, and please don't shoot me down...

 

1) Their IIS is badly setup.

2) iFrame isn't great...

 

Why not page-scrape?  Load it in vial PHP and present it as if on your site?

 

Or - open in another window.  2 frames - 1 small at the top saying "Presented from {Your company}" and then the rest of the page with frame of their content.

 

Sorry, **** suggestions but trying to help :)

page-scape is not a good idea since it can be a copyright/author right etc issue :/

The second one is quite a good idea, atleast informing them that it's not from your site but a another site sounds like a good idea.

Link to comment
Share on other sites

  • 0

May I make a possible suggestion, and please don't shoot me down...

 

1) Their IIS is badly setup.

2) iFrame isn't great...

 

Why not page-scrape?  Load it in vial PHP and present it as if on your site?

 

Or - open in another window.  2 frames - 1 small at the top saying "Presented from {Your company}" and then the rest of the page with frame of their content.

 

Sorry, **** suggestions but trying to help :)

Hm...  The second option sounds good.  I think I'll try to do that.  It's rather bizarre that they set it up that way, as it makes absolutely no sense (And is updated daily, so a download would quickly be worthless anyway)...

 

I really appreciate everyone's help, :D

Link to comment
Share on other sites

  • 0

Regarding solving the issue, why not just rip the code out and put it into your own page with an explanation.

I wouldn't try it.

Sounds too much like Nik Louch's idea..

Link to comment
Share on other sites

This topic is now closed to further replies.