Site-specific preferences in Opera 9
Thursday, 20. October 2005, 17:34:28
Site-specific preferences is exactly what it says, the possibility to set preferences specifically on a site. Opera 8 had a preview of this in its ua.ini, which would override the User-Agent identification on different sites. The support for that file has now been withdrawn, and the setting is instead integrated into the general settings file (you can find the name of it by going to opera:about).
To set the User-Agent to always show Opera when visiting www.opera.com (this is the default setting that is downloaded when you select Help → Check for new version):
[Overrides] www.opera.com [www.opera.com] User Agent|Spoof UserAgent ID=1
As you can see from the example, you need to do two things: First, you need to add a section called [Overrides] that lists the hosts for which the overrides are available. Second, you need to add a preference section for that host name where you add the appropriate setting. Since settings are normally identified by a section (here [User Agent]) and a key (here Spoof UserAgent ID) you need to give both, you do that by separating them with a vertical bar character (|). See the ini documentation for more information on the names used in the preferences file. You can also find the list of supported preferences by using the new opera:config interface.
Not all preferences are supported for overrides (yet). Some will not be (it doesn't make sense to switch UI languages when going to a different site), but more are planned. Here are some that are (at least partially) supported that you can play around with:
-
User Agent|Spoof UserAgent ID to set the User-Agent string ("identify as").
-
Extensions|Frames to enable/disable frames.
-
Extensions|Plugins to enable/disable plug-ins.
-
User Prefs|Enable Referrer to enable referrer logging on a specific site. Please note that it is the referring page (i.e the one you are leaving) that decides whether referrer should be enabled or not. This can be useful if you don't normally like sending referrer, but need to access some over-paranoid page that requires them.
-
Sounds|Enabled to let some pages notify you with sound, while keeping others quiet.
There are more supported than are listed here, see also Håvard's blog entry on the subject. Feel free to play around with it. Better documentation will come later, and we of course plan to make them available from the user interface...



Non-Troppo # 20. October 2005, 23:03
Peter Krefting # 21. October 2005, 07:15
Kostia Romanov # 21. October 2005, 15:12
Can we change blocking per-site?
Peter Krefting # 23. October 2005, 09:34
Kostia Romanov # 24. October 2005, 01:50
But, why I can`t change "Show Images" per-site? It is most usefull…
Peter Krefting # 25. October 2005, 05:06
Andrey Petrov # 6. November 2005, 16:42
Anonymous # 30. November 2005, 19:11
How about blocking scripting for all sites by default but allowing for those in the per-site configuration with Scripting set to 1? I tried blocking javascript by default from within normal Opera prefs, and setting a *.com scripting to 0 but neither worked. I have only been able to block specified sites.
Anonymous # 30. November 2005, 19:21
Nevermind, I got that working after trying again.
Anonymous # 1. December 2005, 02:49
I'm looking for a way to configure this in a way similar to Firefoxes Noscript extension. It works well to prevent ads and scripts from 3rd party sites. The issue at hand is that if I allow scripting from a top level site, all other websites are allowed to use scripts so long as they are within the page I want javascript allowed for. Any solutions?
Peter Krefting # 1. December 2005, 07:12
Anonymous # 2. December 2005, 07:13
You may have to use Firefox Noscript extension to understand exactly what I'm going here. Many pages feature javascript that calls other pages, usually for ads something like script type="text/javascript" language="JavaScript" src="http://pads.vgamin.de/adx.js"> within the www.animesuki.com page. Noscript would offer the ability to deny javascript from vgamin.com, which would effectively destroy the Ad on the page while still allowing scripts from www.animesuki.com so the site itself functioned properly. I tried setting vgamin.com=0 to block all from that specified site. I'm not sure if the new site-specific preferences in opera can offer exactly what im looking for in control for scripting within sites like the noscript firefox extension good. I find that i like the opera UI a lot and have got everything setup for use except a good way to control specific sites as well as firefox.
Peter Krefting # 2. December 2005, 07:29
Anonymous # 3. December 2005, 03:04
Yes I realize it is within the page i am viewing. I was mostly looking for a way to block calls from any site(maybe setting vgamin.com=0) so opera will not load anything(images, frames, ect...) that is from the site. The difference between this, and say a filter.ini is that it would include a UI in later opera 9 revisions. Oh well, wishing for too much.
Tilmann Rückauer # 8. December 2005, 12:12
Need more information? There you go...