+ <varlistentry>
+ <term>Example usage:</term>
+ <listitem>
+ <literallayout>
+ <emphasis>{+kill-popups}</emphasis>
+ <emphasis>.example.com</emphasis>
+ </literallayout>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Notes:</term>
+ <listitem>
+ <para>
+ <quote>+kill-popups</quote> uses a built in filter to disable pop-ups
+ that use the <literal>window.open()</literal> function, etc. This is
+ one of the first actions processed by <application>Privoxy</application>
+ as it contacts the remote web server. This action is not always 100% reliable,
+ and is supplemented by <quote>+filter{<emphasis>popups</emphasis>}</quote>.
+ </para>
+ <!--
+ <para>
+ An alternate spelling is <quote>+kill-popup</quote>, which is
+ interchangeable.
+ </para>
+ -->
+ </listitem>
+ </varlistentry>
+
+</variablelist>
+</sect4>
+
+
+<!-- ~~~~~ New section ~~~~~ -->
+<sect4 id="send-vanilla-wafer">
+<title><emphasis>+send-vanilla-wafer</emphasis></title>
+
+<variablelist>
+ <varlistentry>
+ <term>Type:</term>
+ <!-- Boolean, Parameterized, Multi-value -->
+ <listitem>
+ <para>Boolean.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Typical uses:</term>
+ <listitem>
+ <para>
+ Sends a cookie for every site stating that you do not accept any copyright
+ on cookies sent to you, and asking them not to track you.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Possible values:</term>
+ <listitem>
+ <para>
+ N/A
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Example usage:</term>
+ <listitem>
+ <literallayout>
+ <emphasis>{+send-vanilla-wafer}</emphasis>
+ <emphasis>.example.com</emphasis>
+ </literallayout>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Notes:</term>
+ <listitem>
+ <para>
+ This action only applies if you are using a <filename>jarfile</filename>
+ for saving cookies. Of course, this is a (relatively) unique header and
+ could conceivably be used to track you.
+ </para>
+ </listitem>
+ </varlistentry>
+
+</variablelist>
+</sect4>
+
+
+<!-- ~~~~~ New section ~~~~~ -->
+<sect4 id="send-wafer">
+<title><emphasis>+send-wafer</emphasis></title>
+
+<variablelist>
+ <varlistentry>
+ <term>Type:</term>
+ <!-- Boolean, Parameterized, Multi-value -->
+ <listitem>
+ <para>Multi-value.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Typical uses:</term>
+ <listitem>
+ <para>
+ This allows you to send an arbitrary, user definable cookie.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Possible values:</term>
+ <listitem>
+ <para>
+ User specified cookie name and corresponding value.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Example usage:</term>
+ <listitem>
+ <literallayout>
+ <emphasis>{+send-wafer{name=value}}</emphasis>
+ <emphasis>.example.com</emphasis>
+ </literallayout>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>Notes:</term>
+ <listitem>
+ <para>
+ This can be specified multiple times in order to add as many cookies as you
+ like.
+ </para>
+ </listitem>
+ </varlistentry>
+
+</variablelist>
+</sect4>
+
+
+<!-- ~~~~~ New section ~~~~~ -->
+<sect4 id="act-examples" renderas="sect3">
+<title>Actions Examples</title>
+<para>
+ Note that the meaning of any of the above examples is reversed by preceding
+ the action with a <quote>-</quote>, in place of the <quote>+</quote>. Also,
+ that some actions are turned on in the default section of the actions file,
+ and require little to no additional configuration. These are just <quote>on</quote>.
+ But, other actions that are turned on the default section <emphasis>do
+ typically require</emphasis> exceptions to be listed in the lower sections of
+ actions file. E.g. by default no URLs are <quote>blocked</quote> (i.e. in
+ the default definitions of <filename>default.action</filename>). We need
+ exceptions to this in order to enable ad blocking.
+</para>
+
+<para>
+ Some examples:
+</para>
+
+<para>
+ Turn off cookies by default, then allow a few through for specified sites
+ (showing an excerpt from the <quote>default</quote> section of an actions
+ file ONLY):
+</para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ # Excerpt only:
+ # Allow cookies to and from the server, but
+ # for this browser session ONLY
+ {
+ # other actions normally listed here...
+ -prevent-setting-cookies \
+ -prevent-reading-cookies \
+ +session-cookies-only \
+ }
+ / # match all URLs
+
+ # Exceptions to the above, sites that benefit from persistent cookies
+ # that are saved from one browser session to the next.
+ { -session-cookies-only }
+ .javasoft.com
+ .sun.com
+ .yahoo.com
+ .msdn.microsoft.com
+ .redhat.com
+
+ </literallayout>
+ </msgtext>
+ </literal>
+</para>
+
+<para>
+ Now turn off <quote>fast redirects</quote>, and then we allow two exceptions:
+</para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ # Turn them off (excerpt only)!
+ {
+ # other actions normally listed here...
+ +fast-redirects
+ }
+ / # match all URLs
+
+ # Reverse it for these two sites, which don't work right without it.
+ {-fast-redirects}
+ www.ukc.ac.uk/cgi-bin/wac\.cgi\?
+ login.yahoo.com
+ </literallayout>
+ </msgtext>
+ </literal>
+</para>
+
+<para>
+ Turn on page filtering according to rules in the defined sections
+ of <filename>default.filter</filename>, and make one exception for
+ Sourceforge:
+ </para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ # Run everything through the filter file, using only certain
+ # specified sections:
+ {
+ # other actions normally listed here...
+ +filter{html-annoyances} +filter{js-annoyances} +filter{kill-popups}\
+ +filter{webbugs} +filter{nimda} +filter{banners-by-size}
+ }
+ / #match all URLs
+
+ # Then disable filtering of code from all sourceforge domains!
+ {-filter}
+ .sourceforge.net
+ </literallayout>
+ </msgtext>
+ </literal>
+</para>
+
+<para>
+ Now some URLs that we want <quote>blocked</quote> (normally generates
+ the <quote>blocked</quote> banner). Typically, the <quote>block</quote>
+ action is off by default in the upper section of an actions file, then enabled
+ against certain URLs and patterns in the lower part of the file. Many of these use <link
+ linkend="regex">regular expressions</link> that will expand to match multiple
+ URLs: </para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ # Blocklist:
+ {+block}
+ ad*.
+ .*ads.
+ banner?.
+ count*.
+ /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
+ /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
+ .hitbox.com
+ /.*/(ng)?adclient\.cgi
+ /.*/(plain|live|rotate)[-_.]?ads?/
+ /.*/abanners/
+ /autoads/
+ </literallayout>
+ </msgtext>
+ </literal>
+</para>
+
+<para>
+ Note that many of these actions have the potential to cause a page to
+ misbehave, possibly even not to display at all. There are many ways
+ a site designer may choose to design his site, and what HTTP header
+ content, and other criteria, he may depend on. There is no way to have hard
+ and fast rules for all sites. See the <link
+ linkend="ACTIONSANAT">Appendix</link> for a brief example on troubleshooting
+ actions.
+</para>
+</sect4>
+
+</sect3>
+
+<!-- ~ End section ~ -->
+
+
+<!-- ~~~~~ New section ~~~~~ -->
+<sect3 id="aliases">
+<title>Aliases</title>
+<para>
+ Custom <quote>actions</quote>, known to <application>Privoxy</application>
+ as <quote>aliases</quote>, can be defined by combining other <quote>actions</quote>.
+ These can in turn be invoked just like the built-in <quote>actions</quote>.
+ Currently, an alias can contain any character except space, tab, <quote>=</quote>,
+ <quote>{</quote> or <quote>}</quote>. But please use only <quote>a</quote>-
+ <quote>z</quote>, <quote>0</quote>-<quote>9</quote>, <quote>+</quote>, and
+ <quote>-</quote>. Alias names are not case sensitive, and
+ <emphasis>must be defined before other actions</emphasis> in the
+ actions file! And there can only be one set of <quote>aliases</quote>
+ defined per file. Each actions file may have its own aliases, but they are
+ only visible within that file.
+</para>
+
+<para>
+ Now let's define a few aliases:
+</para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ # Useful custom aliases we can use later. These must come first!
+ {{alias}}
+ +prevent-cookies = +prevent-setting-cookies +prevent-reading-cookies
+ -prevent-cookies = -prevent-setting-cookies -prevent-reading-cookies
+ fragile = -block -prevent-cookies -filter -fast-redirects -hide-referer -kill-popups
+ shop = -prevent-cookies -filter -fast-redirects
+ +imageblock = +block +handle-as-image
+
+ # Aliases defined from other aliases, for people who don't like to type
+ # too much: ;-)
+ c0 = +prevent-cookies
+ c1 = -prevent-cookies
+ #... etc. Customize to your heart's content.
+ </literallayout>
+ </msgtext>
+ </literal>
+</para>
+
+<para>
+ Some examples using our <quote>shop</quote> and <quote>fragile</quote>
+ aliases from above. These would appear in the lower sections of an
+ actions file as exceptions to the default actions (as defined in the
+ upper section):
+</para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ # These sites are very complex and require
+ # minimal interference.
+ {fragile}
+ .office.microsoft.com
+ .windowsupdate.microsoft.com
+ .nytimes.com
+
+ # Shopping sites - but we still want to block ads.
+ {shop}
+ .quietpc.com
+ .worldpay.com # for quietpc.com
+ .scan.co.uk
+
+ # These shops require pop-ups also
+ {shop -kill-popups}
+ .dabs.com
+ .overclockers.co.uk
+ </literallayout>
+ </msgtext>
+ </literal>
+</para>
+
+<para>
+ The <quote>shop</quote> and <quote>fragile</quote> aliases are often used for
+ <quote>problem</quote> sites that require most actions to be disabled
+ in order to function properly.
+
+</para>
+
+</sect3>
+</sect2>
+
+<!-- ~ End section ~ -->
+
+
+<!-- ~~~~~ New section ~~~~~ -->
+<sect2 id="filter-file">
+<title>The Filter File</title>
+<para>
+ Any web page can be dynamically modified with the filter file. This
+ modification can be removal, or re-writing, of any web page content,
+ including tags and non-visible content. The default filter file is
+ <filename>default.filter</filename>, located in the config directory.
+</para>
+
+<para>
+ This is potentially a very powerful feature, and requires knowledge of both
+ <quote>regular expression</quote> and HTML in order create custom
+ filters. But, there are a number of useful filters included with
+ <application>Privoxy</application> for many common situations.
+</para>
+
+<para>
+ The included example file is divided into sections. Each section begins
+ with the <literal>FILTER</literal> keyword, followed by the identifier
+ for that section, e.g. <quote>FILTER: webbugs</quote>. Each section performs
+ a similar type of filtering, such as <quote>html-annoyances</quote>.
+</para>
+
+<para>
+ This file uses regular expressions to alter or remove any string in the
+ target page. The expressions can only operate on one line at a time. Some
+ examples from the included default <filename>default.filter</filename>:
+</para>
+
+<para>
+ Stop web pages from displaying annoying messages in the status bar by
+ deleting such references:
+</para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ FILTER: html-annoyances
+
+ # New browser windows should be resizeable and have a location and status
+ # bar. Make it so.
+ #
+ s/resizable="?(no|0)"?/resizable=1/ig s/noresize/yesresize/ig
+ s/location="?(no|0)"?/location=1/ig s/status="?(no|0)"?/status=1/ig
+ s/scrolling="?(no|0|Auto)"?/scrolling=1/ig
+ s/menubar="?(no|0)"?/menubar=1/ig
+
+ # The <BLINK> tag was a crime!
+ #
+ s*<blink>|</blink>**ig
+
+ # Is this evil?
+ #
+ #s/framespacing="?(no|0)"?//ig
+ #s/margin(height|width)=[0-9]*//gi
+ </literallayout>
+ </msgtext>
+ </literal>
+</para>
+
+<para>
+ Just for kicks, replace any occurrence of <quote>Microsoft</quote> with
+ <quote>MicroSuck</quote>, and have a little fun with topical buzzwords:
+</para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ FILTER: fun
+
+ s/microsoft(?!.com)/MicroSuck/ig
+
+ # Buzzword Bingo:
+ #
+ s/industry-leading|cutting-edge|award-winning/<font color=red><b>BINGO!</b></font>/ig
+ </literallayout>
+ </msgtext>
+ </literal>
+</para>
+
+<para>
+ Kill those pesky little web-bugs:
+</para>
+
+<para>
+ <literal>
+ <msgtext>
+ <literallayout>
+ # webbugs: Squish WebBugs (1x1 invisible GIFs used for user tracking)
+ FILTER: webbugs