Sign in to follow this  
Followers 0

Link to Website that requires download?


11 posts in this topic

Posted

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-

Share this post


Link to post
Share on other sites

Posted

You can load the page in a iframe as far as I know :/

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted

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,

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted

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 :/

Share this post


Link to post
Share on other sites

Posted

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 :)

Share this post


Link to post
Share on other sites

Posted

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.

Share this post


Link to post
Share on other sites

Posted

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

Share this post


Link to post
Share on other sites

Posted

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..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.