Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I click link to log file(I have a log of links like that) the firefox opens the file, but I want to just save it(like I do with PDFs). However I dont have log file defined as Manage File Type. How can I add log files there?

share|improve this question
up vote 1 down vote accepted

Firefox, like all other browsers, uses the HTTP Content-Type header to decide how to handle the page. In your case, the log file is served as text/plain, which is handled by Firefox internally. Whether the URL ends in .txt or .log does not matter.

If you have access to the web server, you could reconfigure it to serve .log files as, for example, application/x-log-file - either by editing .htaccess if the server is running Apache, or by reconfiguring the server itself.

If you don't have access to the web server's configuration, it's also possible to write a small script (in PHP or any other language) that would set headers and output the desired file:

if (isset($_GET["file"])) {
    header("Content-Type: application/x-log-file");
} else {
    echo "<ul>\n";
    foreach (glob("*.log") as $name) {
        echo '<li> <a href="?file='.htmlspecialchars($name).'">'
    echo "</ul>\n";
share|improve this answer
cool idea, however If I make page like this <a href="bla.pdf">a</a> and click it the firefox saves the pdf to the file. he recognize the extension. I think there should be a way in adv ff options to add new recognizable types. – IAdapter Dec 20 '10 at 6:03
@01: It doesn't. Your webserver tells it that the file is of type application/pdf. See for yourself. – grawity Dec 20 '10 at 16:24

I got this to work with .rdp files with the following links:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .