but there are still websites that render horribly, at least with the default configuration. much of the time2 this isn't due to a shortcoming in KHTML, but rather because the HTML being loaded commits the sin of trying to detect the browser with some javascript hack that doesn't work and then altering the output based on that. not only is this sort of chicanery usually not necessary these days, but it's easy to get wrong which results in shortshrifting browsers that the website designer didn't bother to think of or care about.
so many websites out there try and be clever in this way and end up not recognizing Konqueror and so spit out the wrong HTML. this gives Konqueror a bad name for rendering that it really doesn't deserve. if one simply switches the user agent3 for that site to be, say, IE6 the site will often suddenly look and work perfectly!
this is because the KHTML developers have gone to great lengths to support the quirks and behaviors commonly found in other browsers which so many sites on the world wide web rely on (for better or worse? nah... for worse). but this effort goes under-appreciated due to these web site's broken "browser detection" Javascripts.
here's a "solution"4 that i think would work handily: collect a list of commonly visited websites that render poorly in Konqueror because of the aforementioned problem. then create a set of default UA settings for them that cause them to render properly. preferably, these UA settings would contain the string "Konqueror" or "Your Website Sucks And So Do the People Who Made It"5 so that they are trackable by those who might care to.
then this file could either be distributed with Konqueror or be made available, say through a Hot New Stuff download. or maybe even extend the current UA switcher plugin to have a list of "known sites" that it could reference and then pop up a little dialog asking if the user would like to switch browser identifications for better results (with a "never ask again" checkbox, of course).
someone pointed me to this article on Qt4 Designer. seems we agree on a lot of issues, and it's a nice read to boot. they even use their shift key.
that's all for now. makundi6!
[1] there are still some JS slowdowns to be found, but the HTML rendering itself is quite speedy, and KJS and it's KHTML bindings have gotten noticeably faster over the past few releases. back
[3] this is where Konqueror plugins shine. to easily switch User Agents in Konqi, one simly has to go under the Tools menu and select Change Browser Identification (or User Agent if using older versions) to get a list of possible options. this will remember the setting for this domain, and will remain persistent between visits until you reset it! this menu has also gotten a nice ergonomic reorganization in 3.4! back

3 comments:
You mean custom UA strings like the ones that can be found on this page of mine:
http://david.jamesnet.ca/kde/konqueror.html
-David
yes, exactly like these:
http://david.jamesnet.ca/kde/useragentstrings.tar.gz
now just to create a listing of these UA's to Known Bad Sites. =)
I thought "he was just joking" and tried with a site that normally renders horribly in Konqui, making it unusable (www.tmb.net), and....papapaparapapa...it worked like a charm! it's not perfect though, but now the site is useful and you can do what it's meant for. Thanks Aaron!
Post a Comment