Site-specific preferences for subdomains
Published: 2006-11-17 09:11:58
Recently a question about how site-specific preferences in Opera 9 cascade down to subdomains was posted to the opera.general news group. Since there seems to be some confusion in the area, I thought I’d take the opportunity to clarify a bit.
Suffix matching
The site-specific preferences in Opera 9 does not only match on the host they were defined for, but it also cascades down to any host sharing the same suffix as the first domain. That is, if you set a site-specific preference for example.org, it will also apply for www.example.org and intranet.example.org. However, if you set the preference for www.example.org, it will not apply to www.intranet.example.org, since they do not share a common suffix. It will, however, apply to intranet.www.example.org, should such a domain name exist.
This applies to all the domains you configure through the user interface. To make the lookup as fast as possible, it is not possible to disable this cascading effect.
Prefix matching
It is also possible to do prefix matching, which can be useful if you want to match a service that has domains under many top domains. You do that by adding an asterisk (*) at the end of the domain name when you create a site-specific preference for the domain. This means that you cannot use the page right-click menu, you will have to use the main preferences (Tools (or Opera) → Preferences → Advanced → Content → Manage site preferences) for this.
If you set up a site-specific preference for www.example.* this will match both www.example.org and www.example.com. Please be aware, however, that it will also match www.example.phishingsite.com, which might not be what you want.
Comments
- Date: 2006-11-17 17:11:29
- Name: Eddie_Lopez
GeekK-
In the written sense yeah. But domains are ordered from right to left. So the prefix actually is the ".com" since that is the top domain (as was mentioned in the article)
semantics, whaddya gonna do?
- Date: 2006-11-18 15:11:16
- Name: nafmo
I mean suffix and prefix as in what you enter is the suffix (the regular site preferences) or prefix (for the form with the trailing asterisk). I could perhaps have been a bit clearer, sorry for that.
- Date: 2006-11-21 20:11:58
- Name: paginabrasileira
prefix not supported? bad news...
look:
groups.myspace.com
blog.myspace.com
profile.myspace.com
music.myspace.com
etc...
etc...
if i wish aply a UserCSS to myspace? i'm lose many time setting to diferents pages.....
- - - - - - -
SORRY MY HORRIBLE ENGLISH
I'M A BRAZILIAN.....
- Date: 2006-11-24 11:11:42
- Name: nafmo
paginabrasileira: If you want to apply the same style sheet to all the myspace.com sites, simply set it for "myspace.com", it will then apply to all the sites you listed, using the suffix matching I describe in the blog post.
- Date: 2010-04-04 20:04:07
- Name: ernesteban
I'm sorry for replying to such an old article, but is it possible to use URL strings with wild-cards with the same freedom you have when defining URLs for blocking content?
Say I want to apply a user stylesheet to "website.com", is it possible to apply a different stylesheet to "website.com/something" by using this as a selector: "website.com/something"? Or do I need to replace the forward slash with a wildcard, like so: "website.com*something"?
Anyway, I tried both ways (and some other ways) of defining the URL in a new entry in site preferences, but none worked so far. I even doubt now if it is possible to do this. Can you enlighten me in this matter?
- Date: 2010-04-08 13:04:50
- Name: nafmo
ernesteban: No, site-specific preferences only look at domain names, not full URLs.
- Date: 2010-09-19 21:09:42
- Name: PabloMendoza
Thanks, it was my doubt :)
This was originally posted on My Opera at
http://my.opera.com/nafmo/blog/show.dml/569826
Please note that links may be outdated and any information included here
may be obsolete.
← Översättningsförvirring | Opera Mini 3.0 out now → | Back to the post index | Back to the archive index | Peter's homepage
I think you mean 'prefix' when you say 'suffix' and vice versa. ;)
edit: thanks EL :)