Why Does Chrome Keep Downloading HTML?

Have you recently tried to open a webpage, and your Chrome browser just keeps downloading an HTML file? You’re certainly not alone. Why does Chrome keep downloading HTML?

Chrome keeps downloading HTML as a file because of an issue with the server. This is the most common reason. However, it can also be because of Chrome’s settings or possibly even a virus.

In this article, I’ll mention some possible reasons why your Chrome keeps downloading HTML and some tips on resolving this issue. Additionally, if you’re using Safari or Firefox, don’t worry; I’ll also discuss those.

Chrome browser sometime downloads html files of websites. This fixes it.
It is definitely annoying when you see that a website you want to visit just downloads HTML every time. Luckily, often this is easily fixed.

Possible Reasons Chrome Keeps Downloading HTML

There are a limited number of possible reasons as to why your Chrome keeps downloading HTML instead of just opening a webpage. In addition, for some people, Chrome automatically downloads a PDF file instead of opening it in the browser in a separate tab. 

These reasons occur because of different issues, so it’s not just one problem with Chrome or your computer. In most cases, it’s got nothing to do with Chrome itself. 

The issue with Chrome downloading HTML comes in two forms for many people. In the first case, you’re trying to enter a webpage, and instead of that, Chrome downloads the HTML.

What can also happen is that you’re already on a webpage, and Chrome decides to download the HTML from hyperlinks. This is related to another issue with Chrome that some users experienced: that Chrome keeps downloading their PDF files as HTML documents.

So, let’s take a look at some of these reasons and why they occur. 

The Server Isn’t Properly Configured To Send the Right Content Type

Sometimes, the problem isn’t Chrome but the server that wasn’t properly configured when you viewed a web page.

This means that Chrome can decide which mime type to use to open a particular file, and instead of opening a webpage sent through HTTP, it downloads it as an HTML file to your computer. 

If this happens, you’ll probably need to delete the handler from the .htaccesss file. Sometimes, some modifications can occur in this file, which means that a handler gets added that, in turn, starts handling various requests. If you don’t know how to do this, have somebody do it for you, just to be on the safe side.

The Original Website Chooses the Downloading Option

Every website ultimately decides how certain content will be provided to a user, including the interaction with any hyperlink found on their site. 

Basically, website owners can decide if a hyperlink will be automatically downloaded when you enter a webpage when you click on a hyperlink, or if the content will be opened in another Chrome tab.

All of this depends on the type of content that’s shared through a hyperlink. If the content is, say, an Amazon product, then the hyperlink will most probably lead you to another tab, but if it’s a PDF or a DOC format, then the webpage decides how that will be downloaded. There’s not much we can do about that, though.

Here’s a useful video explaining this process in detail: 

A Virus Causes Chrome To Download HTML

Another reason your Chrome might download HTML automatically is because there’s some kind of localhost virus on your computer. When this happens, however, the virus affects the entire browser, which means you won’t even be able to use the Google search bar without Chrome downloading an HTML file. 

It’s a rare instance of this issue, but it can happen. So, try to run your system through an antivirus program, and that should find and fix the issue.

Although HTML isn’t a common target for hackers, it’s not completely safe. I’ve written an article about how HTML can be hacked and what you can do to prevent it.

Chrome’s Settings Automatically Download Files

Depending on the version, Chrome’s settings can be the reason why certain files are automatically downloaded as HTML. 

In this case, the issue’s due to your Chrome and not some external factor. To fix this, try to delete your browsing data

Here are the steps to clean your browsing data in Chrome:

  1. Go to “Settings” in the top right corner.
  2. Choose “Privacy and Security” on the left side of your screen.
  3. Choose “Clear browsing data.”

You can choose to clear either all the data (which might take some time) or switch to the “Advanced” option and choose only a specific period when you think the issue first appeared.

Caveat: Make Sure Keys Aren’t Pressed on the Keyboard

What sometimes happens is that the Alt key (Option key for Mac) on your keyboard gets stuck, and Chrome simply receives the command to download the files present on a webpage. So, check if that’s the case with your Alt key. 

In other cases, there might be a glitch whereby Chrome thinks the Alt key is pressed, and it downloads the files. If that happens, end all tasks and restart Chrome. If that doesn’t do the trick, then it’s a more serious issue. 

Why Does Safari Keep Downloading HTML?

Chrome is not the only browser that experiences the issue of downloading HTML. Over the years, Safari users have seen the same issue with their browsers. So what’s causing it?

Safari keeps downloading HTML because the web servers use the wrong headers, which causes this browser to download HTML automatically. Another reason is that the automatic download is the desired preference of the original web pages.

There are two ways you could try to stop Safari browser from downloading HTML.

Turn Off the Auto-Download Option in the Settings

If auto-download is a web page’s preference, you can’t do much about that. However, you can turn off the ability of those web pages to download every file without you knowing it. 

Safari has the option to turn off the automatic download (which is downloading without asking for your permission) in their settings menu. 

Change the Headers From the Web Server

If you’re tech-savvy, you could change the headers from web servers to reflect your desired preference. Based on that preference, you can choose to read a file in your browser or if you want it to download or not.

Why Does Firefox Keep Downloading HTML?

Your Firefox browser is downloading HTML because the original web page you’re visiting designed their site like that. Additionally, Firefox may download HTML files automatically due to the web servers’ malfunction.

Firefox used to have fewer of these issues than Chrome, but that changed recently. This is because Firefox decided to automatically download files from a web page, just like Chrome, instead of asking the users for their permission to download anything. 

One way you can minimize the issue of automatic download of HTML files in Firefox is by disabling the automatic download option in the settings. Here’s how to do it:

  1. Go to “Options” in the upper right corner of your Firefox browser.
  2. In the “General” section, scroll down to the “Files and Applications” subsection.
  3. Choose the “Always ask you where to save files” option.

Conclusion

Although only some experience the issue of Chrome downloading HTML files automatically, it can be a really annoying thing. 

There are generally four main reasons for this issue to happen:

  • The server’s not configured properly.
  • The original web page’s preference.
  • A virus.
  • Chrome’s settings allow it.

Apart from Chrome, this can also happen with Firefox and Safari.