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.
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.
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.