Sign up | Lost password? | Help

[ advanced search ]

[user js] fix double compressed webpages

Forums » Opera Community » General Opera topics » User JavaScript

Monday, 17. July 2006, 21:28:45

xErath

javascript guru

avatar

Posts: 6405

Norway

Opera Software

[user js] fix double compressed webpages

As some of you might know, there are out there, mis-configured webservers that host a joomla or phpbb web application, which internally compress their pages, is they're configured to do so. The problem arises when a incompetent webmaster sets but the web application, and the webserver software itself to compress content. Opera gets content compressed twice. !!!
I've crafted a solution.
fix-gzipped-pages.js

Basically it re-fetches the current page, with a IE user agent string and Accept-Encoding header set to identity.
Then magic is needed to parse the responseText to a DOM tree.. because I ALL websites I've tested, responseXML ends up being always a empty document.... ! :irked:

But big problem: it doesn't work in Opera 9 ! because buggy young Opera 9 refuses to run user script in garbage pages.
You may try the script in these urls.
http://www.siemens-mobiles.org/component/option,com_smf/Itemid,106/
http://www.metallicabb.com/forum/
I'd apreciate if someone could report the Opera 9 bug of not running the script.

Please post below more urls of websites that do this.

Meanwhile I've raised this issue to at the phpbb forums.
http://www.phpbb.com/phpBB/viewtopic.php?t=413337

Wednesday, 13. September 2006, 22:09:20 (edited)

ale5000

avatar

Posts: 195

Italy

Your fix doesn't detect this site: http://www.windowsinfo.eu/index.php?option=com_content&task=view&id=25&Itemid=43
You only need to change /%1F%u[\dabcdef]{4}%08/ to /%1F%(u[\dabcdef]{4}|8B)%08/

Thursday, 14. September 2006, 04:38:59

xErath

javascript guru

avatar

Posts: 6405

Norway

Opera Software
Thank you !
New version uploaded. Refer to link in the first post.

Thursday, 14. September 2006, 04:45:07

Darken

Dragonfly rulez!

avatar

Posts: 356

Canada

Thanx for the update xErath

Thursday, 14. September 2006, 22:02:22

ale5000

avatar

Posts: 195

Italy

Typo: this.statue == 304

Friday, 15. September 2006, 03:35:27

xErath

javascript guru

avatar

Posts: 6405

Norway

Opera Software

Originally posted by ale5000:

this.statue == 304


:D

Forums » Opera Community » General Opera topics » User JavaScript