Version: (using KDE KDE 3.2.0) Installed from: SuSE RPMs OS: Linux Consider a link pointing to the top level of site without a trailing slash, e.g. http://www.ard.de (instead of http://www.ard.de/ ) After clicking this link and going back to that page, the link color does not change to mark the link as visited. With a trailing slash, the color changes correctly. Example: http://www.heise.de/newsticker/meldung/44880 In the first paragraph, a link (labeled "ARD") points to http://www.ard.de - this is not marked as visited. A different link in the same paragraph (labeled "Kabel Deutschland") points to http://www.kabeldeutschland.de/ - this is correctly marked. This problem does not occur when visiting subdirectories (for example, when a link points to http://www.heise.de/newsticker which is changed to http://www.heise.de/newsticker/ automatically in the address line, the link is correctly marked). If I remember correctly, this problem did not occur when I first used KDE 3 (3.0.5 or later), was introduced in a later version (don't know which; I think I at least used 3.1.1, 3.1.3, and 3.1.4), disappeared again (at least in 3.1.5, maybe earlier) and now shows up again in 3.2.0.
*** Bug 52847 has been marked as a duplicate of this bug. ***
I think that Bug 52847 does not really fall under the pattern I have described. In that case, the link (e.g. http://slashdot.org/articles/04/02/21/1349221.shtml ) does not point to the top level of a site. Also, the link matches exactly what is displayed in the address line of konqueror after clicking it. The problem with this link seems to be more specific. However, looking at the left column of Slashdot, for example the link "Books" (pointing to http://books.slashdot.org ) falls under the pattern I described above. It shows the same behaviour.
I can reproduce this with 3.2 branch.
This problem still exists after upgrading to 3.2.1.
This problem still exists after upgrading to 3.2.3.
CVS commit by binner: Color 'http://foo' links as visited if 'http://foo/' is in history BUG: 75771 M +4 -1 cssstyleselector.cpp 1.328 --- kdelibs/khtml/css/cssstyleselector.cpp #1.327:1.328 @@ -754,5 +754,8 @@ static void checkPseudoState( const CSSS } //completeURL( attr.string() ); - pseudoState = KHTMLFactory::vLinks()->contains( u ) ? PseudoVisited : PseudoLink; + bool contains = KHTMLFactory::vLinks()->contains( u ); + if ( !contains && u.contains('/')==2 ) + contains = KHTMLFactory::vLinks()->contains( u+'/' ); + pseudoState = contains ? PseudoVisited : PseudoLink; }
In HTTP, http://example.com, http://example.com/, http://example.com/foo, and http://example.com/foo/ all represent different entities. Indeed, it's possible to make a typical web server such as Apache present different entities for each URL, although by default many do seem to offer canonicalization (e.g. redirect to http://example.com/foo/ when you visit http://example.com/foo). Unlike the file systems we are often used to, in URL space, a "directory" can can contain both a "file" and "subdirectory" with identical names. I don't think that browsers should force a file-system-centric view of URL space by treating http://example.com/foo as visited if http://example.com/foo/ is, or http://example.com as visited for http://example.com/ for that matter. The real issue is that people who publish URL's are not careful about their trailing slashes.
When I click on a link to http://example.com , that link should be marked as visited afterwards (independently of the question if the server redirects me to http://example.com/ or not). Therefore, I think that John Belmonte's comment does not change the fact that the original behaviour is a bug. (However, he might be right that the fix in comment #6 is not the correct solution to the problem.)
You need to log in before you can comment on or make changes to this bug.