1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

One site opens dialog box, one site does not

Discussion in 'Programming' started by chrisj, May 22, 2015.

  1. #1
    When this link is selected:

    <a href="../upload/[blk1.thumbnail]"><img src="../images/MI.png" alt=""></a>
    Code (markup):
    in website1, the file appears successfully (in all browsers).

    In website2, when that link is selected a dialog box asking: ‘Do you want to open or save (the file name) from (web-address)? Open Save Cancel", (this only happens when viewing in IE9 and IE10), Chrome and IE8 open the file successfully upon selecting the link. In FF it says "You have chosen to open (the file name) which is application/ocet-stream from (web-address) OPEN SAVE CANCEL

    Same php web script, same web server, same computer accessing the sites (for both website1 and website2).

    The only glaring difference is that website2 has an SSL certificate, website 1 does not.

    I'm trying to fix this so the file opens successfully in all browsers in website2.

    Any ideas on what to check/change/add will be greatly appreciated.
     
    chrisj, May 22, 2015 IP
  2. billzo

    billzo Well-Known Member

    Messages:
    961
    Likes Received:
    278
    Best Answers:
    15
    Trophy Points:
    113
    #2
    First off, make sure all files requested by the https page are going to https.

    Secondly, check your headers to ensure that a Content-Type header is being sent for the image. (Check this in Firefox, hit F12 to get into Web Developer Tools, go to the Network tab, reload the page and select the file and look in the right pane.) Then look for another header to see if it is sent as a file download.

    I looked in IE and did not see any area where file types could be set for default handling. But there could be, so check for that, too.
     
    billzo, May 22, 2015 IP
  3. chrisj

    chrisj Well-Known Member

    Messages:
    606
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    Thanks for your reply
     
    chrisj, May 25, 2015 IP