Ability To Link To A Specific Anchor In Api Documentation

This is not a framework request but a request about the website part that hosts the class references: http://www.yiiframework.com/doc/api/ (yes I used bettor’s words :)

Sometimes you want to link to a direct Anchor in a class reference, like http://www.yiiframework.com/doc/api/1.1/CHtml#checkBoxList-detail

If you write it like above, it works, but if you remove the "www" or the version number ("1.1" here), you lose the anchor and are redirected to an anchor-less link, like http://www.yiiframework.com/doc/api/1.1/CHtml

So here are 2 examples that do not work as expected:

What browser are you using? Both examples work fine for me in Chrome 27, Firefox 21 and Opera 12.15. Not in Safari 6.0.4 though.

Safari 5.1.9

And here are the HTTP responses:


Request URL:http://yiiframework.com/doc/api/1.1/CHtml#checkBoxList-detail

Request Method:GET

Status Code:301 Moved Permanently


Request Headers

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='8)' /> AppleWebKit/534.59.8 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.8

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8


Response Headers

Date: Tue, 04 Jun 2013 18:32:55 GMT

Content-Encoding: gzip

Connection: Keep-Alive

Content-Length: 208

Server: Apache

Vary: Accept-Encoding

Content-Type: text/html; charset=iso-8859-1

Location: http://www.yiiframework.com/doc/api/1.1/CHtml

Keep-Alive: timeout=2, max=32


Request URL:http://www.yiiframework.com/doc/api/CHtml#checkBoxList-detail

Request Method:GET

Status Code:302 Found


Request Headers

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='8)' /> AppleWebKit/534.59.8 (KHTML, like Gecko) Version/5.1.9 Safari/534.59.8

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8


Response Headers

Date: Tue, 04 Jun 2013 18:34:01 GMT

Content-Encoding: gzip

Connection: Keep-Alive

Content-Length: 20

Server: Apache

Vary: Accept-Encoding

Content-Type: text/html; charset=UTF-8

Location: http://www.yiiframework.com/doc/api/1.1/CHtml

Keep-Alive: timeout=2, max=32

Other browsers keep the url fragment upon redirect, and Safari is apparently the only browser not complying to some standard…

https://bugs.webkit.org/show_bug.cgi?id=24175

Yeah, and the fragment isn’t sent to the server, so there’s not much the website can do to fix it. With a 4 year old bug report I don’t see Apple fixing it anytime soon either.