You need to be logged in to post in the forums. If you do not have an account, please sign up first.
Opera not interpreting gzipped content-encoding
I'm trying to browse to a site that is delivering its content gzipped. The only thing is that the server is not sending a "content-encoding" header. I believe that Opera therefore displays the content as garbled, gzipped data. Firefox and IE somehow get it decoded. Here are the headers:HTTP/1.1 200 OK
Date: Mon, 12 Apr 2010 22:28:52 GMT
Server: Apache/2.2.10 (Unix) mod_ssl/2.2.10 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Last-Modified: Mon, 12 Apr 2010 22:24:26 GMT
ETag: "1958b3c-9964-484119b8f1a80"
Accept-Ranges: bytes
Content-Length: 39268
Cache-Control: max-age=3333, public, must-revalidate, proxy-revalidate
Expires: Mon, 12 Apr 2010 23:24:26 GMT
X-Powered-By: W3 Total Cache/0.8.5.2
Vary: Accept-Encoding,Cookie
Pragma: public
Content-Type: text/html; charset=UTF-8
My question is, is there any way to make Opera guess the content-encoding when the header is not given, or maybe when in quirks mode (since it is an invalid page, it is rendering the page in quirks mode)? Or is there some other way to hint Opera that the content is gzipped? Maybe if a site does this I should add them to blocked content?
Any input is welcomed.
I've experienced this issue as well. Here is a site with this problem
http://genesjournalcomic.com/
And the returned headers
HTTP/1.1 200 OK
Date: Thu, 15 Apr 2010 12:24:49 GMT
Server: Apache/2.0.52 (CentOS)
Last-Modified: Thu, 15 Apr 2010 11:01:26 GMT
ETag: "ff82bc-10ec-6a7c0d80"
Accept-Ranges: bytes
Content-Length: 4332
Cache-Control: max-age=-1403, public, must-revalidate, proxy-revalidate
Expires: Thu, 15 Apr 2010 12:01:26 GMT
X-Pingback: http://www.genesjournalcomic.com/xmlrpc.php
X-Powered-By: W3 Total Cache/0.8.5.2
Vary: Accept-Encoding,Cookie
Pragma: public
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Encoding: deflate
The problem can occur even with content encoding specified.
I have come across a number of other sites with this issue and some sites where only certain pages exhibit the problem.
It appears to be a uniquely 10.5, 10.51 issue as this problem does not occur in earlier versions of Opera.
http://genesjournalcomic.com/
And the returned headers
HTTP/1.1 200 OK
Date: Thu, 15 Apr 2010 12:24:49 GMT
Server: Apache/2.0.52 (CentOS)
Last-Modified: Thu, 15 Apr 2010 11:01:26 GMT
ETag: "ff82bc-10ec-6a7c0d80"
Accept-Ranges: bytes
Content-Length: 4332
Cache-Control: max-age=-1403, public, must-revalidate, proxy-revalidate
Expires: Thu, 15 Apr 2010 12:01:26 GMT
X-Pingback: http://www.genesjournalcomic.com/xmlrpc.php
X-Powered-By: W3 Total Cache/0.8.5.2
Vary: Accept-Encoding,Cookie
Pragma: public
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Encoding: deflate
The problem can occur even with content encoding specified.
I have come across a number of other sites with this issue and some sites where only certain pages exhibit the problem.
It appears to be a uniquely 10.5, 10.51 issue as this problem does not occur in earlier versions of Opera.
The site I grabbed those headers from is http://bodyrock.tv/. Also, I tried different user agents and it made no difference.
I noticed that both sites are using the "W3 Total Cache/0.8.5.2" so I Googled total cache and Opera and found http://wordpress.org/support/topic/360032 that talks about configuring Wordpress to work around this problem.
I also tried putting "Accept-Encoding: gzip" and other things into opera:config#Network|HTTPAccept to see if I could force Opera to send headers that would request a compatible compression method and it didn't make a difference in what I saw. Not sure if it actually sent the headers, tho since I don't have a sniffer installed right now.
I also tried putting "Accept-Encoding: gzip" and other things into opera:config#Network|HTTPAccept to see if I could force Opera to send headers that would request a compatible compression method and it didn't make a difference in what I saw. Not sure if it actually sent the headers, tho since I don't have a sniffer installed right now.
Looks like a solution is on its way. According to FrederickTownes in this post http://wordpress.org/support/topic/360032?replies=16#post-1495135, the default setting for W3 Total Cache is gzip. However, it looks like the recommended setting for W3TC was given as "HTTP compression: gzip and deflate (best)". He also says that in future releases, deflate will be removed from W3TC. I believe this will clear up this issue.
If you're using 10.5, 10.51 & Opera identifies itself as Opera to google, then you could try to access the page you want from google, which should send the uncompressed version.
The following is a quote from this page:
http://webcache.googleusercontent.com/search?q=cache:8rOdzYY6Ww4J:www.howtocreate.co.uk/browserSpeed.html+browser+speed+comparison&cd=1&hl=en&ct=clnk&gl=uk&client=opera
in the Linux section it says google thinks that Opera can't handle gzipped pages.
"...Google uses the wrong HTTP header to check if the browser can handle a gzip compressed page, which Opera can. Instead of checking the Accept-Encoding header, which correctly says this, they check the User-Agent, and only use gzip if the browser claims to be Mozilla or MSIE (other browsers like Safari and Konqueror are also included in this). Setting Opera to use 'ID as MSIE' (default setting on Opera 8) or 'ID as Mozilla 5.0' makes Google send it the compressed version as well. "
That link is from google's page cache in fact. The author doesn't want too many people going direct to his page.
The following is a quote from this page:
http://webcache.googleusercontent.com/search?q=cache:8rOdzYY6Ww4J:www.howtocreate.co.uk/browserSpeed.html+browser+speed+comparison&cd=1&hl=en&ct=clnk&gl=uk&client=opera
in the Linux section it says google thinks that Opera can't handle gzipped pages.
"...Google uses the wrong HTTP header to check if the browser can handle a gzip compressed page, which Opera can. Instead of checking the Accept-Encoding header, which correctly says this, they check the User-Agent, and only use gzip if the browser claims to be Mozilla or MSIE (other browsers like Safari and Konqueror are also included in this). Setting Opera to use 'ID as MSIE' (default setting on Opera 8) or 'ID as Mozilla 5.0' makes Google send it the compressed version as well. "
That link is from google's page cache in fact. The author doesn't want too many people going direct to his page.