X
Nhấn vào đây để đến phiên bản di động của trang web.

Diễn đàn trợ giúp

Downloading .docx files gets gibberish

Được đăng

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.

Giải pháp được chọn

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.

Đọc câu trả lời này trong ngữ cảnh 0

Chi tiết hệ thống bổ sung

Phần bổ trợ đã cài đặt

  • Shockwave Flash 11.9 r900
  • Google Update
  • RealPlayer(tm) LiveConnect-Enabled Plug-In
  • RealPlayer Download Plugin
  • Adobe PDF Plug-In For Firefox and Netscape 11.0.05
  • 5.1.20913.0
  • RealNetworks(tm) RealDownloader Chrome Background Extension Plug-In
  • RealNetworks(tm) RealDownloader PepperFlashVideoShim Plug-In
  • RealNetworks(tm) RealDownloader HTML5VideoShim Plug-In
  • RealDownloader Plugin
  • The plug-in allows you to open and edit files using Microsoft Office applications

Ứng dụng

  • Firefox 26.0
  • Chuỗi đại diện người dùng: Mozilla/5.0 (Windows NT 6.1; rv:26.0) Gecko/20100101 Firefox/26.0
  • URL hỗ trợ: https://support.mozilla.org/1/firefox/26.0/WINNT/en-US/

Tiện ích mở rộng

  • Troubleshooter 1.1a (troubleshooter@mozilla.org)
  • avast! Online Security 9.0.2006.53 (wrc@avast.com) (không hoạt động)

Javascript

  • incrementalGCEnabled: True

Đồ họa

  • adapterDescription: Mobile Intel(R) 965 Express Chipset Family
  • adapterDescription2:
  • adapterDeviceID: 0x2a02
  • adapterDeviceID2:
  • adapterDrivers: igdumdx32 igd10umd32
  • adapterDrivers2:
  • adapterRAM: Unknown
  • adapterRAM2:
  • adapterVendorID: 0x8086
  • adapterVendorID2:
  • direct2DEnabled: False
  • direct2DEnabledMessage: [u'blockedDriver']
  • directWriteEnabled: False
  • directWriteVersion: 6.2.9200.16492
  • driverDate: 9-23-2009
  • driverDate2:
  • driverVersion: 8.15.10.1930
  • driverVersion2:
  • info: {u'AzureCanvasBackend': u'skia', u'AzureFallbackCanvasBackend': u'cairo', u'AzureContentBackend': u'none', u'AzureSkiaAccelerated': 0}
  • isGPU2Active: False
  • numAcceleratedWindows: 1
  • numTotalWindows: 1
  • webglRenderer: Google Inc. -- ANGLE (Mobile Intel(R) 965 Express Chipset Family Direct3D9Ex vs_3_0 ps_3_0)
  • windowLayerManagerRemote: False
  • windowLayerManagerType: Direct3D 9

Thay đổi cài đặt

  • browser.cache.disk.capacity: 358400
  • browser.cache.disk.smart_size.first_run: False
  • browser.cache.disk.smart_size.use_old_max: False
  • browser.cache.disk.smart_size_cached_value: 358400
  • browser.places.smartBookmarksVersion: 4
  • browser.sessionstore.upgradeBackup.latestBuildID: 20131205075310
  • browser.startup.homepage_override.buildID: 20131205075310
  • browser.startup.homepage_override.mstone: 26.0
  • dom.mozApps.used: True
  • extensions.lastAppVersion: 26.0
  • network.cookie.prefsMigrated: True
  • places.database.lastMaintenance: 1387814870
  • places.history.expiration.transient_current_max_pages: 93692
  • plugin.disable_full_page_plugin_for_types: application/pdf
  • plugin.importedState: True
  • privacy.sanitize.migrateFx3Prefs: True
  • storage.vacuum.last.index: 0
  • storage.vacuum.last.places.sqlite: 1387814869

Linh tinh

  • Người dùng JS: Không
  • Có thể tiếp cận: Không
sheetalpatel 0 giải pháp 7 câu trả lời
Được đăng

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

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

Người tạo câu hỏi

Using Microsoft Office 2007

Using Microsoft Office 2007
Carm 6 giải pháp 179 câu trả lời
Được đăng

I was able to get it to work:

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

Tested in chrome and Firefox

I was able to get it to work: https://www.dropbox.com/s/djlrnszm4wmq6l0/GABL1213_1.docx Tested in chrome and Firefox

Người tạo câu hỏi

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.

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.
Carm 6 giải pháp 179 câu trả lời
Được đăng

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 ?

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 ?
Carm 6 giải pháp 179 câu trả lời
Được đăng

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

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

Được chỉnh sửa bởi Carm vào

John99 971 giải pháp 13138 câu trả lời
Được đăng

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

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

Người tạo câu hỏi

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.

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.
John99 971 giải pháp 13138 câu trả lời
Được đăng

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)

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 *http://forums.mozillazine.org/viewforum.php?f=25 ---------- Forum Note <br /> I have tagged this as ''escalate'' AND ''offtopic'' <br />(New tagging sytem and guidelines not yet discussed fully or published)

Người tạo câu hỏi

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.

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.
Carm 6 giải pháp 179 câu trả lời
Được đăng

Please go back to the link I posted.

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

Please go back to the link I posted. Please tell me '''yes or no''' does it open in the browser in Firefox browser?
John99 971 giải pháp 13138 câu trả lời
Được đăng

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.

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: <br /> 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 *try http://web-sniffer.net/ That detects the content type as ''gzip'' 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.

Người tạo câu hỏi

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.

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.

Người tạo câu hỏi

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

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
jscher2000
  • Top 10 Contributor
8757 giải pháp 71653 câu trả lời
Được đăng

Giải pháp được chọn

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.

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.
Carm 6 giải pháp 179 câu trả lời
Được đăng

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

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
jscher2000
  • Top 10 Contributor
8757 giải pháp 71653 câu trả lời
Được đăng

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.

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.
Carm 6 giải pháp 179 câu trả lời
Được đăng

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.

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.
AliceWyman
  • Moderator
240 giải pháp 2597 câu trả lời
Được đăng
(For the record) Related articles: *http://kb.mozillazine.org/Page_displays_as_gibberish *http://kb.mozillazine.org/File_types_and_download_actions
cor-el
  • Top 10 Contributor
  • Moderator
17516 giải pháp 158398 câu trả lời
Được đăng

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.


It all depends on how the server sends such a file.<br /> If the file is send as text/plain then Firefox will open the file in a tab. ---- *https://developer.mozilla.org/Properly_Configuring_Server_MIME_Types *https://developer.mozilla.org/How_Mozilla_determines_MIME_Types