homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Browsers / Opera Browser Usage and Support
Forum Library, Charter, Moderator: open

Opera Browser Usage and Support Forum

Opera, Options +MultiViews and name anchors

10+ Year Member

Msg#: 402 posted 11:19 am on Nov 14, 2005 (gmt 0)

I'm using content negotiation (htaccess Options +MultiViews) to remove specific file extensions from URLs. This works very well as far as I can tell, however it causes me a minor problem with name anchors within a page.

Let say I have linked to www.example.com/page which is what will be displayed in the visitors address bar.

The actual page is www.example.com/page.htm.

This page includes get data, so lets assume the visitor is on the page www.example.com/page?widget=green

If I put a link on the page such as <a href="#top">Back to top</a>, IE and mozilla will both interpret the link as pointing to www.example.com/page?widget=green#top. However Opera will link to www.example.com/page.htm#top.

I believe this is because of the http header "Content-Location: page.htm" that will be returned with the page request.

I can overcome this behaviour by linking instead to REQUEST_URI#top however I have a couple of questions:

Is Opera's behaviour correct? While the browser is informed of the actual content location, the page does return a 200, so should the original URL not be used? Why would Opera also remove query strings from the link?

Should I give up on multiviews and try to use mod_rewrite instead?



10+ Year Member

Msg#: 402 posted 11:45 am on Nov 14, 2005 (gmt 0)

Well it seems Opera's interpretation is the correct one:

The Content-Location entity-header field MAY be used to supply the resource location for the entity enclosed in the message when that entity is accessible from a location separate from the requested resource's URI. A server SHOULD provide a Content-Location for the variant corresponding to the response entity; especially in the case where a resource has multiple entities associated with it, and those entities actually have separate locations by which they might be individually accessed, the server SHOULD provide a Content-Location for the particular variant which is returned.

Content-Location = "Content-Location" ":"
( absoluteURI relativeURI )

The value of Content-Location also defines the base URI for the entity.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Browsers / Opera Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved