Jump to content



Photo

Link to Website that requires download?

html

  • Please log in to reply
10 replies to this topic

#1 M_Lyons10

M_Lyons10

    Neowinian Senior

  • Joined: 21-October 08
  • Location: Pennsylvania

Posted 20 June 2013 - 14:13

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.st...D=482402&mode=2

 

Thanks so much for your help.

-Matt-




#2 +Seahorsepip

Seahorsepip

    http://seapip.com

  • Tech Issues Solved: 17
  • Joined: 23-January 11
  • Location: Netherlands
  • OS: Windows 8.1 Pro
  • Phone: Nexus 5

Posted 20 June 2013 - 16:07

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



#3 LaP

LaP

    Forget about it

  • Tech Issues Solved: 4
  • Joined: 10-July 06
  • Location: Quebec City, Canada
  • OS: Windows 8.1 Pro Update 1

Posted 20 June 2013 - 16:16

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.



#4 OP M_Lyons10

M_Lyons10

    Neowinian Senior

  • Joined: 21-October 08
  • Location: Pennsylvania

Posted 20 June 2013 - 18:18

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,



#5 ashpowell

ashpowell

    Neowinian

  • Joined: 13-November 06
  • Location: UK
  • OS: Windows 8.1
  • Phone: Nexus 5

Posted 21 June 2013 - 09:31

Could a link from here help you out? http://www.portal.st...D=482402&mode=3



#6 articuno1au

articuno1au

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 20-March 11
  • Location: Brisbane, Australia

Posted 21 June 2013 - 09:40

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.



#7 +Seahorsepip

Seahorsepip

    http://seapip.com

  • Tech Issues Solved: 17
  • Joined: 23-January 11
  • Location: Netherlands
  • OS: Windows 8.1 Pro
  • Phone: Nexus 5

Posted 21 June 2013 - 10:23

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



#8 +Nik L

Nik L

    Where's my pants?

  • Tech Issues Solved: 2
  • Joined: 14-January 03

Posted 21 June 2013 - 10:37

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



#9 +Seahorsepip

Seahorsepip

    http://seapip.com

  • Tech Issues Solved: 17
  • Joined: 23-January 11
  • Location: Netherlands
  • OS: Windows 8.1 Pro
  • Phone: Nexus 5

Posted 21 June 2013 - 15:11

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.



#10 OP M_Lyons10

M_Lyons10

    Neowinian Senior

  • Joined: 21-October 08
  • Location: Pennsylvania

Posted 21 June 2013 - 15:20

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



#11 articuno1au

articuno1au

    Neowinian Senior

  • Tech Issues Solved: 2
  • Joined: 20-March 11
  • Location: Brisbane, Australia

Posted 22 June 2013 - 12:36

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