Skip navigation.

exploreopera

| Help

Sign up | Help

Innuendo and out the other

About Opera and stuff

Posts tagged with "filter.ini"

Content blocking in Opera 9 Technology Preview 2

, , ,

This post is a tutorial on how to use the content block feature introduced in Opera 9 Technical Preview 2. The feature is work-in-progress, but the Technical Preview will let you have a taste of how it works and make us gather feedback for future improvements.

Opera has had a feature that would let you block certain paths, protocols or servers for a long time. This feature has been configured using the "filter.ini" file and mostly used in kiosk mode or with third party tools. Documentation for this feature is part of the kiosk documentation found here.

The new content block feature in Opera 9 TP2 is based on the existing functionality that has been in Opera for a long time, but adds an easy-to-use user interface for maintaining this file.

To enable the feature, you need to set the page in "content block mode".

When you select the "Block content..." menu entry, the page will go into "content block mode". When the page is in this mode, all content that can be blocked (images and plugins) will appear normal, while text and other content will be greyed out.

You can now click on all the content you want to block and it will be added to the list of blocked content. Images and plugins will be drawn with a clear sign overlaid on the content when it is blocked.

A toolbar will be available when the page is in content block mode that will let you save, cancel or edit the filters that has been created so far.

If you press the "Details..." button, you will be able to edit the pattern Opera has created automatically to block content coming from the same path on the webserver.

As you can see, Opera has already created a pattern with a * wildcard to block all content that is loaded from the path starting at "http://portal.opera.com/img/". You may edit, delete or add new manual paths to be blocked in this dialog. * will match anything and ? will match a single character.

When you are done selecting the content to block, press "Done" in the toolbar.

If you would like to edit and delete all the paths to content that is currently being blocked by Opera, you may use the menu entry Tools->Advanced->Blocked content...


When you later load a webpage that contains blocked content, this content will not be loaded from the server and will be collapsed on the webpage.

Some changes have been made lowlevel compared to how the existing filter.ini filtering used to work:

- URLs are initially filtered in the layout engine and Opera will not attempt to load blocked content from the server. The layout engine will collapse the blocked content using the equivalent of the CSS "display: none".
- Lowlevel blocking of complete sites will still occur, so the existing functionality of filter.ini has not been changed. This could eg. be used to create rudimentary parental filters too.
- The default name for the configuration file is "urlfilter.ini" and if you have added content to block using the user interface, there is no need to configure a file or create a file.