Site-specific preferences in Opera 9
Published: 2005-10-20 19:10:28
The first technical preview of Opera 9 was published today, and it contains the beginnings of support for a feature that has often been requested in our various wish-list forums, namely site-specific preferences. I have been working on this feature for quite some time now. Opera 9 preview is the first publicly available version where this support is available, and now I finally can step forward and say yes, we are indeed working on that. 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=1As 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.
Comments
- Date: 2005-10-21 09:10:16
- Name: nafmo
You can only set preferences on domain basis. The settings will cascade, so if you set an override for "opera.com" it will affect both "www.opera.com" and "my.opera.com".
- Date: 2005-10-21 17:10:12
- Name: Kildor
And what about pop-ups?
Can we change blocking per-site?
- Date: 2005-10-23 11:10:11
- Name: nafmo
Kildor: Yes, changing popup blocking setting per-site should work. In theory, all the settings available from the quick preferences menu (F12) should be overridable.
- Date: 2005-10-24 03:10:48
- Name: Kildor
nafmo, yes, I found and make this…
But, why I can`t change "Show Images" per-site? It is most usefull…
- Date: 2005-10-25 07:10:30
- Name: nafmo
Kildor: "Show images" is currently a per-window setting, which means that the value in preferences is only used when you open a new window, and you can have different settings for different windows. It is yet unclear how this should be combined with site-specific preferences, but I do agree that it would be useful.
- Date: 2005-11-06 17:11:45
- Name: FataL
Also would be very useful per site zoom and Fit to window width. :up: :wait:
- Date: 2005-11-30 20:11:13
- Name: anonymous
Fufufu writes:
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.
- Date: 2005-11-30 20:11:33
- Name: anonymous
Fufufu writes:
Nevermind, I got that working after trying again.
- Date: 2005-12-01 03:12:20
- Name: anonymous
Fufufu writes:
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?
- Date: 2005-12-01 08:12:26
- Name: nafmo
Fufufu, I'm not quite sure what it is you are tyring to do, but the site-specific preferences are currently keyed to the domain (server name) only, so you will have to enable it for the entire domain or not at all.
- Date: 2005-12-02 08:12:30
- Name: anonymous
Fufufu writes:
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"></script> 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.
- Date: 2005-12-02 08:12:26
- Name: nafmo
The domain you disable scripting for is the one that the page you are viewing is served in, not the one that the script comes from, so I don't think you will be able to do what you want by only using Opera 9's settings.
- Date: 2005-12-03 04:12:16
- Name: anonymous
Fufufu writes:
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.
- Date: 2005-12-08 13:12:59
- Name: t_matze
If you whish to block content from a specific site entirely, you might want to use the filter.ini.
Need more information? There you go... ;)
- Date: 2010-02-14 14:02:29
- Name: nafmo
arnymars: http://weblog.timaltman.com/archive/2006/05/02/site-specific-vs-window-level-preferences
- Date: 2011-02-07 23:02:49
- Name: nafmo
anymars, the situation is still the same, unfortunately.
- Date: 2012-06-27 15:06:03
- Name: arnymars
Peter
Why Fit-to-Width (Rendering mode) is not allowed in override? Its allowed to override it in Session files, and its often required for sites designed for a particular screen size. Please add it or explain rational.
- Date: 2012-06-27 15:06:03
- Name: arnymars
Peter
Any progress on Fit-to-Width being implemented site specific? The link you give contains old simplistic and artificial (while solution is obvious) explanation why nothing was done at that time. The guy no longer works for Opera. How about you? Anyone is assigned to work on this issue? Why its so low priority despite many years of user demand?
This was originally posted on My Opera at
http://my.opera.com/nafmo/blog/show.dml/47674
Please note that links may be outdated and any information included here
may be obsolete.
← Opera Mini på svenska | Tweaking preferences in Opera 9 → | Back to the post index | Back to the archive index | Peter's homepage
Good stuff! Are only top-level domains supported (I've yet to play properly!), and if so are you planning to extend it?