Firefox - pages sometimes open in 'save as' dialog

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
jnicol

Firefox - pages sometimes open in 'save as' dialog

Post by jnicol »

I have a CMSMS site that runs fine in IE. In Firefox, sometimes when a page loads, instead of loading into the browser as you would expect, Firefox opens a dialog prompting me to save/open the file. The message reads something like:

You have chosen to open [page name]
which is an application/octet-stream
Would you like to Open ... Save to disc ... ?

In other words, the browser is being served up a file it doesn't recognize as a web page, and treats it as an application/octet-stream instead.

If I save the file to disc, this is what it looks like:

‹              HTTP/1.1 200 OK
Date: Wed, 25 Jul 2007 03:29:49 GMT
Server: Apache/2.0.59 (CentOS)
X-Powered-By: PHP/4.3.9
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 2396
Keep-Alive: timeout=15, max=89
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8

[LARGE CHUNK OF GIBBERISH TEXT FOLLOWS, PRESUMABLY BINARY DATA]

Note that there are a few gibberish characters before the header starts, I am wondering if perhaps that is what is throwing the browser?

I thought perhaps using pretty URLs might be causing the problem, but it still happens whether they are on or off. I also changed the page options so they are not cacheable, but it still happens.

Also it is worth noting that occasionally while a page will load in Firefox, but it will take 10+ seconds, compared to the usual load time of less than 1 second.

Any ideas?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Firefox - pages sometimes open in 'save as' dialog

Post by Dr.CSS »

I've seen this before mostly on pages that take too long to render, it's a slow server issue...
jnicol

Re: Firefox - pages sometimes open in 'save as' dialog

Post by jnicol »

The server seems pretty fast, but I agree it seems like a server issue. The live site is hosted on a hosting account my client (the site owner) already had. On my hosted development server I didn't notice any problems, nor on my local development server.
samplist
Forum Members
Forum Members
Posts: 38
Joined: Fri Sep 08, 2006 7:42 am

Re: Firefox - pages sometimes open in 'save as' dialog

Post by samplist »

it seems like a configuration problem on the webserver (apache?). I had the same problem on one site that is hosted in a server that is owned by a large hosting company. I switched to a smaller hosting company that seems to pay more attention to configuration...
jnicol

Re: Firefox - pages sometimes open in 'save as' dialog

Post by jnicol »

I figured out why the pages are sometimes slow to load. It's similar to the 'save as' problem, only instead of the HTML header/page being corrupted, it is javascript files.

I can see in Firebug that occassionally a JS error is thrown: Illegal character at position 1 in xxxx.js. The wait I believe is while Forefox tries to figure out what to do with the corrupted file. The bad JS file is then locally cached, and subsequent page loads will also be slow, as the same corrupted JS file is pulled from the browser cache. Clearing the browser cache will get load speeds back to normal - until the next time the server supplies a corrupted file!

Everything is pointing to a bad server configuration, as you guys have suggested. I am going to test on another server, and report back on the results.
Locked

Return to “CMSMS Core”