Safari: Auto-open .html files rather than downloading

Discussion in 'macOS' started by Nick Jinks, Feb 22, 2013.

  1. Nick Jinks macrumors member

    Joined:
    Aug 17, 2010
    #1
    I have to read alot of .html files at work, but for some reason Safari has started downloading rather than displaying them.

    Normally I can open them like any other link [and have them display in a new tab], but now they're automatically downloaded to the HD.

    Have I accidentally changed a setting or something, can anyone help me fix this minor but really annoying problem?
     
  2. Nick Jinks thread starter macrumors member

    Joined:
    Aug 17, 2010
    #2
  3. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #3
    Are you talking about PDF files or HTML webpages? :confused:

    Safari is designed, by default, to display HTML. It would be a poor browser that didn't.;)
    If you want to save the page for later, you can put it in your Reading List, or save a Web Archive of the page and all its dependencies.

    As for PDFs: Safari will also display them by default. You can adjust the behaviour with that Terminal command you list, changing YES or NO as required.

    If you want to view PDF files in Safari, use "NO".
     
  4. Nick Jinks thread starter macrumors member

    Joined:
    Aug 17, 2010
    #4
    ....Ugh, that'll teach me to post without coffee. I meant .html documents not .pdf files.

    Alot of technical readouts I work with are saved in .html documents. Normally I click on them and they open in Safari by default, but recently they're default downloading instead. Considering I work with hundreds of them a day, it's really inconvenient.
     
  5. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #5
    Does it happen with specific links on a specific webpage, or with all links in all webpages (which would make the browser hard to use).

    Can you post a link to a page that has links which download rather than display, for others to test?
     
  6. Nick Jinks thread starter macrumors member

    Joined:
    Aug 17, 2010
    #6
    I can't really post examples of the files I use. Anywhere on the web that I can use as an example? Not sure what other websites would store info in .html documents like that.
     
  7. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #7
    Now you're losing me. Are you sure you mean .html files?

    .html files are HyperText Markup Language, and are the standard format for web pages. Therefore nearly ALL websites store and display their information in .html files.

    That is why I asked you if you could show me an example of a webpage (which would itself be .html) that has links which you expect to display a new page, but in fact download.

    Do some sites work, and others not? Is it only (work-related?) files on a particular site that don't work properly? Then perhaps something is wrong with the files.
    Do the files display in Safari after you have downloaded them?
     
  8. Nick Jinks thread starter macrumors member

    Joined:
    Aug 17, 2010
    #8
    The reports are generated automatically, and have a .html extension. Isn't that a .html document, at least that's what my Mac calls them?

    I normally open them directly from the server [which I access remotely via Safari login], but now the files/documents/whatever are downloading rather than opening.
     
  9. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #9
    OK, yes, that's an html file.

    It is possible for a webpage or server to specify that a file downloads rather than displays, of course. If the file is generated on the fly, that's a possibility.

    I'm unaware of any setting in Safari that would cause this to happen. If it is only these files from this one server, then it's possible the change is at their end.
     
  10. Nick Jinks thread starter macrumors member

    Joined:
    Aug 17, 2010
    #10
    I've asked my colleagues and none of them are having this problem, and I've also checked my extensions and plug ins.
     
  11. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #11
    Then you could try deleting Safari preferences. They'll be in the user Library Preferences folder, named com.apple.safari.plist

    The user Library is normally hidden in Lion. Hold <alt> and click on the Go menu > Library to get it.

    There's various other bits of Safari stuff in the Library that could be deleted -- or tested on removal.
     
  12. Nick Jinks thread starter macrumors member

    Joined:
    Aug 17, 2010
    #12
    OK, I finally found this thread again after I lost my link. I also tried deleting the file you suggested, but it didn't make any difference.

    Does anyone have another idea, or should I just resign myself to this weird problem?
     

Share This Page