X
Tap here to go to the mobile version of the site.

Support Forum

File type .cbv displays contents rather than gives download options

Posted

I've just changed website hosting supplier; both old and new suppliers run Linux services. My site is scottishcca.co.uk - a correspondence chess site - and I'm using Win7 and Firefox 26.0. There's a page (members/downloads) where members can download e-magazines and files of chess games - the page is password protected using htaccess/htpasswd which works ok. Each e-magazine has 4 download links: pdf, zip and pgn all work correctly, but cbv does not - it just displays file contents in the browser page. What should happen is that the browser should bring up a dialogue box asking if the file should be opened with ChessBase 11 Database Software (which is associated with the .cbv file type on my computer - I checked my Default Program settings). The .pgn file type is also associated with ChessBase 11 Database Software and works correctly - the dialogue box allows me to open or save. All the links work correctly when I use Google Chrome. I'm puzzled - advice please! Iain

I've just changed website hosting supplier; both old and new suppliers run Linux services. My site is scottishcca.co.uk - a correspondence chess site - and I'm using Win7 and Firefox 26.0. There's a page (members/downloads) where members can download e-magazines and files of chess games - the page is password protected using htaccess/htpasswd which works ok. Each e-magazine has 4 download links: pdf, zip and pgn all work correctly, but cbv does not - it just displays file contents in the browser page. What should happen is that the browser should bring up a dialogue box asking if the file should be opened with ChessBase 11 Database Software (which is associated with the .cbv file type on my computer - I checked my Default Program settings). The .pgn file type is also associated with ChessBase 11 Database Software and works correctly - the dialogue box allows me to open or save. All the links work correctly when I use Google Chrome. I'm puzzled - advice please! Iain

Chosen solution

I think I have a fix for this. I went back to my new hosting supplier (easyspace) and received this reply: 'Hi Iain, I have done some research on this for you and have a suggestion for you to try. It is possible that Firefox is not recognising the MIME Type of application/cbv as it is not an IANA registered MIME Type. You could instead try application/octet-stream which is a generic MIME Type for non-text files. This idea came to me while reading the page at https://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types and this document may give you more of an idea as to why this is not working in Firefox. Can you give this a try please and let me know how you get on. Best Regards, Gerry Munn Support Services I implemented Gerry's suggestion via .htaccess in my root directory and everything now works (after clearing Firefox cache). Maybe you could send Gerry a certificate of proficiency!

Read this answer in context 0

Additional System Details

Installed Plug-ins

  • Shockwave Flash 12.0 r0
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • Adobe PDF Plug-In For Firefox and Netscape 11.0.06
  • Adobe PDF Plug-In For Firefox and Netscape 10.1.9
  • Google Update
  • Nokia Suite Enabler Plugin
  • 5.1.20913.0
  • Next Generation Java Plug-in 10.15.2 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0

More Information

FredMcD
  • Top 10 Contributor
4269 solutions 59852 answers

Firefox > Options > Applications. Look for that file type, and change its action to Always Ask.

'''''Firefox > Options > Applications'''''. Look for that file type, and change its action to '''''Always Ask'''''.

Question owner

I looked for that file type in Firefox > Options > Applications, but it doesn't exist. There doesn't seem to be a way I can add a new file type. Iain

I looked for that file type in Firefox > Options > Applications, but it doesn't exist. There doesn't seem to be a way I can add a new file type. Iain
FredMcD
  • Top 10 Contributor
4269 solutions 59852 answers

Try going back to Applications and switch EVERYTHING to Always Ask. You can redo the automatic stuff later.

Try going back to '''Applications''' and switch EVERYTHING to '''Always Ask'''. You can redo the automatic stuff later.

Question owner

I set everything to Always Ask (apart from Podcasts and Web Feeds which didn't give that option). I went back to download links, but got exactly the same results - 3 worked correctly, but .cbv just displayed file contents. Iain

I set everything to Always Ask (apart from Podcasts and Web Feeds which didn't give that option). I went back to download links, but got exactly the same results - 3 worked correctly, but .cbv just displayed file contents. Iain
FredMcD
  • Top 10 Contributor
4269 solutions 59852 answers

Hmm. Try to Start Firefox in Safe Mode

BTW, did you know you have two Adobe PDF Plug-In For Firefox and Netscape add-ons?

Hmm. Try to '''''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]'''''<BR><BR> BTW, did you know you have two '''Adobe PDF Plug-In For Firefox and Netscape''' add-ons?
jscher2000
  • Top 10 Contributor
8791 solutions 71890 answers

Firefox generally assesses what to do with web content not by the file extension but by the content type header sent by the server. To see what the server is sending, try using Firefox's Web Console.

After opening the page with the link, open the Web Console (Ctrl+Shift+k), then click the link. The URL should appear in the console. If you click it, Firefox will display the Request and Response headers. Check the Response Headers for the content-type. My suspicion is that Apache doesn't know what a CBV file is, so it is sending "text/plain" or "text/html" which Firefox is dutifully obeying.

To send the correct content type for this media, you can use AddType in your .htaccess file. (You can search for advice on this from sites that help webmasters or on Apache's site.)

Note: If the link to the CBV has a target attribute to open in a new tab, you need to drag the link to the address bar and drop it there, or copy the link and paste it there and press Enter, to get the URL to appear in the Web Console for the current tab.

Firefox generally assesses what to do with web content not by the file extension but by the content type header sent by the server. To see what the server is sending, try using Firefox's Web Console. After opening the page with the link, open the Web Console (Ctrl+Shift+k), then click the link. The URL should appear in the console. If you click it, Firefox will display the Request and Response headers. Check the Response Headers for the content-type. My suspicion is that Apache doesn't know what a CBV file is, so it is sending "text/plain" or "text/html" which Firefox is dutifully obeying. To send the correct content type for this media, you can use AddType in your .htaccess file. (You can search for advice on this from sites that help webmasters or on Apache's site.) ''Note: If the link to the CBV has a target attribute to open in a new tab, you need to drag the link to the address bar and drop it there, or copy the link and paste it there and press Enter, to get the URL to appear in the Web Console for the current tab.''

Modified by jscher2000

Question owner

First, I tried Fred's suggestion of starting Firefox in safe mode - problem persisted.

Second, I tried jscher2000's ideas (I'm still in safe mode here). Got the console running. When I clicked the pdf, zip and pgn links I could see GET url in the console display. When I clicked cbv, nothing appeared in the console and the bowser window showed data content as before. I then tried adding AddType application/cbv .cbv to my .htaccess file, but no joy - but I'm a rookie here, so maybe my syntax is wrong. Iain

First, I tried Fred's suggestion of starting Firefox in safe mode - problem persisted. Second, I tried jscher2000's ideas (I'm still in safe mode here). Got the console running. When I clicked the pdf, zip and pgn links I could see GET url in the console display. When I clicked cbv, nothing appeared in the console and the bowser window showed data content as before. I then tried adding AddType application/cbv .cbv to my .htaccess file, but no joy - but I'm a rookie here, so maybe my syntax is wrong. Iain
jscher2000
  • Top 10 Contributor
8791 solutions 71890 answers

Hi Iain, in case Firefox used the cached file, try using Ctrl+Shift+r to reload the "page" so Firefox has to re-read the headers from the server.

Hi Iain, in case Firefox used the cached file, try using Ctrl+Shift+r to reload the "page" so Firefox has to re-read the headers from the server.

Modified by jscher2000

cor-el
  • Top 10 Contributor
  • Moderator
17573 solutions 158946 answers

You can use the Live Http Headers extension to check the server response and the the content type or open the link in a tab and check Tools > Page Info > General.

You can use the Live Http Headers extension to check the server response and the the content type or open the link in a tab and check Tools > Page Info > General. * https://addons.mozilla.org/firefox/addon/live-http-headers/

Question owner

I restarted Firefox and reloaded the page with Ctrl/Shift/r. I can now see GET http://www.scottishcca.co.uk/members/mag124.cbv plus The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page. in the console, but the browser window continues to show file content.

I restarted Firefox and reloaded the page with Ctrl/Shift/r. I can now see '''GET http://www.scottishcca.co.uk/members/mag124.cbv''' plus '''The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.''' in the console, but the browser window continues to show file content.

Question owner

I installed the Live Http Headers extension but am having difficulty seeing any output. The only Tools menu I can see is the Web Developer one, and I've tried Live Http Headers options to open a new tab for reporting, but nothing showing.

I installed the Live Http Headers extension but am having difficulty seeing any output. The only Tools menu I can see is the Web Developer one, and I've tried Live Http Headers options to open a new tab for reporting, but nothing showing.
cor-el
  • Top 10 Contributor
  • Moderator
17573 solutions 158946 answers

You first have to open he LHH extension, either via a toolbar button that you can drag on a toolbar or via the Tools menu (press F10 or tab the Alt key or use Alt+T).

  • Firefox menu button > Options
  • View > Toolbars (press F10 to display the hidden Menu bar)
  • Right-click empty toolbar area

Once you have the LHH window, you can check off additional boxes on the Generator tab and open or download the .cbv file and check the HTTP response headers.

You first have to open he LHH extension, either via a toolbar button that you can drag on a toolbar or via the Tools menu (press F10 or tab the Alt key or use Alt+T). *Firefox menu button > Options *View > Toolbars (press F10 to display the hidden Menu bar) *Right-click empty toolbar area Once you have the LHH window, you can check off additional boxes on the Generator tab and open or download the .cbv file and check the HTTP response headers.

Question owner

Thanks cor-el - I've got LHH working, with everything checked in the Generator tab. The only message displaying is: #request# GET http://www.scottishcca.co.uk/members/mag124.cbv and the browser window continues to show file content.

Thanks cor-el - I've got LHH working, with everything checked in the Generator tab. The only message displaying is: '''#request# GET http://www.scottishcca.co.uk/members/mag124.cbv''' and the browser window continues to show file content.
jscher2000
  • Top 10 Contributor
8791 solutions 71890 answers

Does Live HTTP Headers show that the server still is not sending the updated content type?

Is the URL a direct URL, or do you have a script file (e.g., index.php) intercepting the request and pulling the file from another location? If a script is used, then the server may default to the content type for the script file instead of the ultimate file that's being delivered. In that cause, you will need to set the content type in the script.

Does Live HTTP Headers show that the server still is not sending the updated content type? Is the URL a direct URL, or do you have a script file (e.g., index.php) intercepting the request and pulling the file from another location? If a script is used, then the server may default to the content type for the script file instead of the ultimate file that's being delivered. In that cause, you will need to set the content type in the script.

Question owner

The only line recorded by LHH is as shown on my last post. There's no script involved, just direct html, viz: <td align="center">| <a href="members/mag124.cbv">cbv</a> |</td>

The only line recorded by LHH is as shown on my last post. There's no script involved, just direct html, viz: '''<td align="center">| <a href="members/mag124.cbv">cbv</a> |</td>'''
jscher2000
  • Top 10 Contributor
8791 solutions 71890 answers

When the gibberish is displayed, could you check the Page Info dialog? Either:

  • right-click and choose View Page Info > General
  • Tools menu > Page Info > General

What this dialog shows as the "Type" usually is the Content-Type sent by the server. I'm guessing it is not application/cbv.

When the gibberish is displayed, could you check the Page Info dialog? Either: * right-click and choose View Page Info > General * Tools menu > Page Info > General What this dialog shows as the "Type" usually is the Content-Type sent by the server. I'm guessing it is not application/cbv.

Question owner

Type shown is text/plain, render mode is Quirks mode, encoding is windows-1252.

Type shown is text/plain, render mode is Quirks mode, encoding is windows-1252.
jscher2000
  • Top 10 Contributor
8791 solutions 71890 answers

The .htaccess change didn't take; I'm not sure why not. But the server needs to be cajoled into sending the correct content type one way or another. Does your hosting have a control panel where you can enter content types?

The .htaccess change didn't take; I'm not sure why not. But the server needs to be cajoled into sending the correct content type one way or another. Does your hosting have a control panel where you can enter content types?

Question owner

I don't see anything on my hosting control panel that can do that. I've re-opened the ticket I had with them (they advised me to contact you as they didn't think it was a server problem; reasonably enough, as IE and Chrome were working ok). I've asked them if there are any Apache or other commands I can use. More tomorrow I hope...

I don't see anything on my hosting control panel that can do that. I've re-opened the ticket I had with them (they advised me to contact you as they didn't think it was a server problem; reasonably enough, as IE and Chrome were working ok). I've asked them if there are any Apache or other commands I can use. More tomorrow I hope...

Chosen Solution

I think I have a fix for this. I went back to my new hosting supplier (easyspace) and received this reply: 'Hi Iain, I have done some research on this for you and have a suggestion for you to try. It is possible that Firefox is not recognising the MIME Type of application/cbv as it is not an IANA registered MIME Type. You could instead try application/octet-stream which is a generic MIME Type for non-text files. This idea came to me while reading the page at https://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types and this document may give you more of an idea as to why this is not working in Firefox. Can you give this a try please and let me know how you get on. Best Regards, Gerry Munn Support Services I implemented Gerry's suggestion via .htaccess in my root directory and everything now works (after clearing Firefox cache). Maybe you could send Gerry a certificate of proficiency!

I think I have a fix for this. I went back to my new hosting supplier (easyspace) and received this reply: ''''''Hi Iain,''' '''I have done some research on this for you and have a suggestion for you to try.''' '''It is possible that Firefox is not recognising the MIME Type of application/cbv as it is not an IANA registered MIME Type.''' '''You could instead try application/octet-stream which is a generic MIME Type for non-text files.''' '''This idea came to me while reading the page at https://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types and this document may give you more of an idea as to why this is not working in Firefox.''' '''Can you give this a try please and let me know how you get on.''' '''Best Regards,''' '''Gerry Munn''' '''Support Services''' I implemented Gerry's suggestion via .htaccess in my root directory and everything now works (after clearing Firefox cache). Maybe you could send Gerry a certificate of proficiency!

Modified by Iain Mackintosh