Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

Downloading .docx files gets gibberish

  • 20 uphendule
  • 6 zinale nkinga
  • 155 views
  • Igcine ukuphendulwa ngu cor-el

more options

I have Firefox 26.0 installed (though this has happened in previous versions). I have been through all the previous questions about this problem, but none match what I'm seeing. It's happening to others accessing my web site. I have a sample web page that I have up that presents the problem at http://flory.net/gabl/docx.htm.

When I click on the link on the above page (an office 2007 word document .docx), I get a page of gibberish as though it downloads the file as a text document. I've been through all the steps I could find in support to fix this to no avail, including resetting all defaults, etc. .doc works great, but I cannot find anything in the Options/Applications that will allow me to modify/add info to handle neither .doc nor .docx.

I have Firefox 26.0 installed (though this has happened in previous versions). I have been through all the previous questions about this problem, but none match what I'm seeing. It's happening to others accessing my web site. I have a sample web page that I have up that presents the problem at http://flory.net/gabl/docx.htm. When I click on the link on the above page (an office 2007 word document .docx), I get a page of gibberish as though it downloads the file as a text document. I've been through all the steps I could find in support to fix this to no avail, including resetting all defaults, etc. .doc works great, but I cannot find anything in the Options/Applications that will allow me to modify/add info to handle neither .doc nor .docx.

Isisombululo esikhethiwe

Unlike Internet Explorer, which examines the beginning of the file itself to reach an opinion about its content-type, Firefox relies on the information supplied by the web server. In this case, the server is sending "text/plain" and Firefox is honoring that. The server needs to be updated to send a better content-type for DOCX files.

Attached screen shots are: Page Info dialog and headers dialog from the Web Console.

Funda le mpendulo ngokuhambisana nalesi sihloko 👍 0

All Replies (20)

more options

Are you using Microsoft Office or some open source free office?

more options

Using Microsoft Office 2007

more options

I was able to get it to work:

https://www.dropbox.com/s/djlrnszm4wmq6l0/GABL1213_1.docx

Tested in chrome and Firefox

more options

So what happened? The link in http://flory.net/gabl/docx.htm still produces the same problem on my 'puter. I'm looking for a general solution to the problem that can be disseminated to non-technical users that visit my site. Anyone can upload this type of file and anyone can download it.

more options

It could be specific to this site. As i stated that i uploaded and was able to click the link and it opened just fine.

Have you tested other browsers ?

more options

Also, further examination of your document shows the first two or three pages are fine, and there are a ton of blank pages, and pages with garbage on it that i see. fyi

Okulungisiwe ngu Carm

more options

Yes I guess the file contains gibberish. The first part including your Christmas greeting and graphics appears ok.

more options

the gibberish actually in the file has nothing to do with the problem. i've attached an image of what i see in the firefox browser when i click on the docx link (after removing all the gibberish in the actual file, btw). the problem does NOT occur in internet exploder nor chrome.

more options

I still see unexplained characters after the main text, when viewing the file whether I use Firefox (multiple versions) or download using Chrome.

As a test why not load the document in Firefox using a local copy of the document . Also try saving the page that opens in Firefox as a file are you able to open that.

I do note that the server response header does not include a specific content type. That may explains why you may open it in Firefox and not get the correct results, but as I said above when I download the file in Google Chrome or Firefox it seems to have unexplained characters in it. (I guess that could be an artefact of the unzipping and NOT using MS Word)

I am trying this in Ubuntu & Windows but not using MS Word.

Some may be along with a better answer, but note that discussion of Website and server problems is not within the normal scope of this forum. Website problems and development may be discussed on an external Mozillazine forum


Forum Note
I have tagged this as escalate AND offtopic
(New tagging sytem and guidelines not yet discussed fully or published)

more options

again, i don't believe it's a web site problem. problem only exists in firefox, i/e and chrome are ok. you were getting a server cached version of the document. i removed it and modified the link so you would get the current version (now has no garbage in the file). but the issue is still occrurring ONLY in firefox. tells me it's a problem in firefox, it doesn't know how to handle the file and i can find no way to tell it HOW to handle the document. as noted in the original post, i've been all of the forum trying everything i could find to fix it, but of the fixes work.

more options

Please go back to the link I posted.

Please tell me yes or no does it open in the browser in Firefox browser?

more options

OK the file looks better now.

Other browsers do not always behave exactly as does Firefox. Firefox itself may vary depending on what addons are installed. As I mentioned earlier a typical Response Header for docx may include

  • Content-Type:
    application/vnd.openxmlformats-officedocument.wordprocessingml.document

In your example I am not seeing any specific Content Type, and certainly not what I may expect. I used the Firefox console. But externally

I will leave this for others to answer.


It is also probably worth noting that Firefox alone out of the box does not support viewing of docx files, but one thing you could try is a reduced test case.

  • Produce a simple testpage, but with sufficient for the code to validate fully e.g. test with http://validator.w3.org/unicorn/ (More complete than your current test)
  • Include a simple docx file for downloading. (Keep it simple short and text only)
  • Now try in Firefox, and check the Response Header to see what the ContentType is.

An obvious solution, why not offer downloads as HTML everyone’s browser will read them. Or as PDF which nearly every smartphone or computer seems able to be capable of dealing with these days.

more options

i believe that i have stated at least once that the file does open in firefox but is all gibberish (see attached image). in i/e and chrome, it simply downloads as expected.

more options

i believe the answer i was looking for finally came in the last response from john99, "It is also probably worth noting that Firefox alone out of the box does not support viewing of docx files". if that was stated early on, it would've been done then and there. sounds like firefox is lacking.

i did put a work around in place where needed to generate the link for any docx file as a call to a php script that forces the download of the file.

thanx, nick

more options

Isisombululo Esikhethiwe

Unlike Internet Explorer, which examines the beginning of the file itself to reach an opinion about its content-type, Firefox relies on the information supplied by the web server. In this case, the server is sending "text/plain" and Firefox is honoring that. The server needs to be updated to send a better content-type for DOCX files.

Attached screen shots are: Page Info dialog and headers dialog from the Web Console.

more options

I think it has to do with that site specifically is not compatible with Firefox and office documents. If you look at the example attached, this will work with dropbox, It also works with a skydrive account as well, it does not work with that site. Unfortunately this is not necessarily a Firefox issue but more of does the site support the use of Firefox and these documents. This has nothing to do with Firefox lacking anything, as i have proved that it opens office docs within it perfectly

I would suggest a skydrive account as it supports the the office suite when opening documents perfectly in ALL browsers.

Best Regards

more options

Hi Carm, Dropbox has a feature to preview certain types of Office documents as PDFs, which explains how it is possible that you are viewing a DOCX file in Firefox's PDF viewer. If you choose the Direct Download option from the Download button (instead of the PDF viewer), you get what I consider to be the expected behavior: Firefox displays the Open/Save/Cancel dialog.

more options

Well, maybe so it is a pdf, but i can confirm it works with a skydrive account, as you stated above there has to be some type on MIME support/Firefox support.

But i guess the point i am making as you are is that is a server issue.

more options
more options

It all depends on how the server sends such a file.
If the file is send as text/plain then Firefox will open the file in a tab.