Bug 54336

Summary: Implement a mechanism by which preferred stylesheets are remembered on a per (sub-)site basis
Product: [Applications] konqueror Reporter: Magnus Kessler <magnus.kessler>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: CONFIRMED ---    
Severity: wishlist CC: almighty, bluedzins, davidpjames
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: HTML page demonstrating the problem (download, then view it in Konqui)
this way it works from within bugzilla ;-)
(x)html test page demonstrating the problem

Description Magnus Kessler 2003-02-09 14:24:07 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Compiled From Sources

Many modern sites offer a choice between multiple styles. Some employ a mechanism using cookies and javascript, by which a style is applied when the user comes back to  the site. This approach in general works badly due to issues with correct JS scripting. It does not work at all if the user has switched off javascript or cookies (or has chosen to treat all cookies as session cookies).

Konqueror should implement a mechanism by which it can remember the user's preferred style for a site. This has to work in such a way that at least all URL's below an entry point are styled in a consistent way.

It might be possible to make this almost transparent to the user by hooking the setting into the existing change stylesheet action.

A good test case would be http://www.wired.com or http://www.alistapart.com
Comment 1 Andreas Leuner 2004-01-09 17:39:17 UTC
Created attachment 4068 [details]
HTML page demonstrating the problem (download, then view it in Konqui)

At least Konqui should remember the users choice via View->Use Stylesheet and
apply it also when showing the next page of the site if it also lists the users
choice as an alternative stylesheet. It would of course be cool if Konqui would
store the choice permanently.
Comment 2 Andreas Leuner 2004-01-09 17:44:20 UTC
Created attachment 4069 [details]
this way it works from within bugzilla ;-)
Comment 3 meldroc 2004-02-01 02:32:00 UTC
I was just going to request this feature - ability to create custom stylesheets in Konqueror specific to individual web sites or groups of web sites.  Mozilla Firebird does have such a feature, and I found it quite useful.
Comment 4 David P James 2004-04-20 22:24:00 UTC
This seems to have been at least partially implemented in 3.2 - using the StyleSheet widget from the configure toolbars tool any sheet that I select is used on subsequent links on that site. If I revisit the site that doesn't happen nor does it happen if I open links in new tabs.
Comment 5 Andreas Leuner 2004-04-20 23:13:16 UTC
Sorry, but I have no idea what StyleSheet widget you are referring to. Could you please post a description how I could get to it? 
IIRC the only place where you can choose between stylesheets offered by a web site is View->Use Stylesheet in the menu. Without cookie support or javascript however, konqui will not remember your choice of an alternative stylesheet here.

Thanks
Comment 6 Andreas Leuner 2004-04-20 23:16:01 UTC
p.s. I currently have KDE CVS-HEAD of 20040419 running.
Comment 7 David P James 2004-04-20 23:38:46 UTC
Settings | Configure Toolbars
-->select Main Toolbar <khtmlpart> (it won't work anywhere else - I just filed bug 80028 on this)
Scroll down the list of available actions until you get to "Use Stylesheet". Move it on to the toolbar and OK the dialog.

Then go visit a site with alternate stylesheets (http://www.kde.org/ works nicely). Select an alternate style and navigate throught some kde links and the style will hold until you reload or open in a new tab.
Comment 8 Andreas Leuner 2004-04-28 10:25:05 UTC
Sorry for my late reply, mozilla thought that mail to be "junk" ;-(
I did what you proposed (this is essentialy equivalent to "View -> Use Stylesheet"). But this feature depends on cookies, so if I do not allow them  the next page I request will have the default style.
Not needing cookies for remembering stylesheet choice is what this wish report is about:
- Konqi knows when a different stylesheet is selected
- Konqi can tell if that stylesheet is also linked on the next page (from its <link rel="alternate stylesheet" tags)

-> Konqi could - just with this knowledge - select that stylesheet again. It doesn't need cookies (or javascript) for that.

I know that most webpages offering a style sheet selection also offer cookies/scripts - but not everybody is willing to accept them. So this feature would really add value to Konqi for those users. 
Besides, it shouldn't cause harm, such as to interfere with other means of stylesheet choosing (cookies/javascript if enabled) if they're used sequentially.
Comment 9 Andreas Leuner 2004-09-16 17:27:35 UTC
Created attachment 7552 [details]
(x)html test page demonstrating the problem
Comment 10 Stefan Monov 2006-08-05 16:12:55 UTC
*** This bug has been confirmed by popular vote. ***
Comment 11 Stefan Monov 2006-11-07 05:00:49 UTC
KDE 3.5.5 here.
In the attachment from comment #9 the page remains green after reload. This means it's implemented I think.

Comment #3 however refers to a different feature, doesn't it?