X-Git-Url: http://www.privoxy.org/gitweb/%40user-manual%40%40actions-help-prefix%40HIDE_IF_MODIFIED_SINCE?a=blobdiff_plain;f=doc%2Fwebserver%2Fuser-manual%2Factions-file.html;h=a08da896b45b643cedbbe7e7aecbc6c72c0022c9;hb=72081f829de368392d04076728f8c991178c0080;hp=9162118f46ec1cb2441be306dd969326f592f075;hpb=a5b1999794b4b0faa68812c0b8b2861316ae8341;p=privoxy.git diff --git a/doc/webserver/user-manual/actions-file.html b/doc/webserver/user-manual/actions-file.html index 9162118f..a08da896 100644 --- a/doc/webserver/user-manual/actions-file.html +++ b/doc/webserver/user-manual/actions-file.html @@ -1,13 +1,13 @@ + Actions FilesPrivoxy 3.1.1 User ManualPrivoxy 3.0.3 User Manual

8. Actions Files

8. Actions Files

The actions files are used to define what actions Privoxy (as of - version 2.9.15), with differing purposes: +> + with differing purposes:

. It is not recommend to edit this file.

The default profiles, and their associated actions, as pre-defined in + standard.action are: +

Table 1. Default Configurations

FeatureCautiousMediumAdventuresome
Ad-blocking by URLyesyesyes
Ad-filtering by sizeyesyesyes
GIF de-animationnoyesyes
Referer forgingnoyesyes
Cookie handlingnonesession-onlykill
Pop-up killingunsolicitedunsolicitedall
Fast redirectsnonoyes
HTML tamingyesyesyes
JavaScript tamingyesyesyes
Web-bug killingyesyesyes
Fun text replacementsnonoyes
Image tag reorderingnonoyes
Ad-filtering by linknonoyes
Demoronizernonoyes
+

The list of actions files to be used are defined in the main configuration - file, and are processed in the order they are defined. The content of these - can all be viewed and edited from default.action is typically process before + user.action). The content of these can all be viewed and + edited from http://config.privoxy.org/show-status

8.1. Finding the Right Mix

8.1. Finding the Right Mix

Note that some "trusted" sites you - will have to make later. If, for example, you want to kill popup windows per + will have to make later. If, for example, you want to crunch all cookies per default, you'll have to make exceptions from that rule for sites that you - regularly use and that require popups for actually useful content, like maybe - your bank, favorite shop, or newspaper.

We have tried to provide you with reasonable rules to start from in the distribution actions files. But there is no general rule of thumb on these @@ -243,7 +443,9 @@ CLASS="SECT2" >

8.2. How to Edit

8.2. How to Edit

The easiest way to edit the actions files is with a browser by using our browser-based editor, which can be reached from "Medium" or "Advanced".

"Adventuresome". + Warning: the "Adventuresome" setting is not only more aggressive, + but includes settings that are fun and subversive, and which some may find of + dubious merit!

If you prefer plain text editing to GUIs, you can of course also directly edit the the actions files. Look at

8.3. How Actions are Applied to URLs

8.3. How Actions are Applied to URLs

Actions files are divided into sections. There are special sections, like the { +handle-as-image } }, - then later another one with just { +block } }, resulting in

8.4. Patterns

8.4. Patterns

+ As mentioned, Privoxy uses "patterns" + to determine what actions might apply to which sites and pages your browser + attempts to access. These "patterns" use wild card type + pattern matching to achieve a high degree of + flexibility. This allows one expression to be expanded and potentially match + against many similar patterns.

Generally, a pattern has the form Generally, a Privoxy pattern has the form + <domain>/<path>, - where both the <domain>/<path>, where both the + <domain> and <domain> and <path> - are optional. (This is why the pattern <path> are + optional. (This is why the special / pattern matches all + URLs). Note that the protocol portion of the URL pattern (e.g. + / matches all URLs).

http://) should not be included in + the pattern. This is assumed already!

www.example.com/www.example.com/

is a domain-only pattern and will match any request to is a domain-only pattern and will match any request to www.example.comwww.example.com, regardless of which document on that server is requested.

www.example.comwww.example.com

means exactly the same. For domain-only patterns, the trailing means exactly the same. For domain-only patterns, the trailing // may be omitted.

www.example.com/index.htmlwww.example.com/index.html

matches only the single document matches only the single document /index.html/index.html - on www.example.comwww.example.com.

/index.html/index.html

matches the document matches the document /index.html/index.html, regardless of the domain, i.e. on

index.htmlindex.html

matches nothing, since it would be interpreted as a domain name and - there is no top-level domain called .html.html.

8.4.1. The Domain Pattern

8.4.1. The Domain Pattern

The matching of the domain part offers some flexible options: if the domain starts or ends with a dot, it becomes unanchored at that end. @@ -456,9 +709,9 @@ NAME="AEN1716">8.4.1. The Domain Pattern

.example.com.example.com

ENDS in - .example.com.example.com

www.www.

STARTS with - www.www.

.example..example.

CONTAINS .example..example. - (Correctly speaking: It matches any FQDN that contains exampleexample as a domain.)

ad*.example.comad*.example.com

*ad*.example.com*ad*.example.com

.?pix.com.?pix.com

matches matches www.ipix.comwww.ipix.com, - pictures.epix.com, pictures.epix.com, a.b.c.d.e.upix.coma.b.c.d.e.upix.com etc.

www[1-9a-ez].example.c*www[1-9a-ez].example.c*

matches matches www1.example.comwww1.example.com, - www4.example.cc, www4.example.cc, wwwd.example.cywwwd.example.cy, - wwwz.example.comwwwz.example.com etc., but not - wwww.example.comwwww.example.com.

8.4.2. The Path Pattern

8.4.2. The Path Pattern

http://www.pcre.org/man.txt. - You might also find the Perl man page on regular expressions (man perlreman perlre) useful, which is available on-line at "(?-i)" switch: switch: www.example.com/(?-i)PaTtErN.*www.example.com/(?-i)PaTtErN.* will match - only documents whose path starts with PaTtErNPaTtErN in

8.5. Actions

8.5. Actions

All actions are disabled by default, until they are explicitly enabled somewhere in an actions file. Actions are turned on if preceded with a @@ -716,29 +973,29 @@ CLASS="QUOTE" CLASS="QUOTE" >"-". So a - +action+action means "do that action", e.g. - +block+block means "please block URLs that match the following patterns", and , and -block-block means "don't - block URLs that match the following patterns, even if +block+block previously applied."

Again, actions are invoked by placing them on a line, enclosed in curly braces and separated by whitespace, like in - {+some-action -some-other-action{some-parameter}}{+some-action -some-other-action{some-parameter}}, followed by a list of URL patterns, one per line, to which they apply. Together, the actions line and the following pattern lines make up a section @@ -781,27 +1038,19 @@ WIDTH="90%" >
  +  +name        # enable action name        # enable action namename
-  -name        # disable action name        # disable action namename

- Example: +block+block

  +  +name{name{param}  # enable action and set parameter to param}  # enable action and set parameter to paramparam,
                # overwriting parameter from previous match if necessary
-  -namename         # disable action. The parameter can be omitted

- Example: +hide-user-agent{ Mozilla 1.0 }+hide-user-agent{ Mozilla 1.0 }

  +  +name{name{param}   # enable action and add param}   # enable action and add paramparam to the list of parameters
-  -name{name{param}   # remove the parameter param}   # remove the parameter paramparam from the list of parameters
                 # If it was the last one left, disable the action.
-  -name-name          # disable this action completely and remove all parameters from the list

- Examples: +add-header{X-Fun-Header: Some text}+add-header{X-Fun-Header: Some text} and - +filter{html-annoyances}+filter{html-annoyances}

8.5.1. add-header

8.5.1. add-header

Any string value is possible. Validity of the defined HTTP headers is not checked. It is recommended that you use the ""X-X-" prefix for custom headers. @@ -1074,7 +1303,9 @@ CLASS="SECT3" >

8.5.2. block

8.5.2. block

Requests for URLs to which this action applies are blocked, i.e. the requests are not forwarded to the remote server, but answered locally with a substitute page or image, - as determined by the handle-as-image - and set-image-blocker actions.

both - block and block and handle-as-image, apply to the same request: it will then be replaced by an image. If - set-image-blocker (see below) also applies, the type of image will be determined by its parameter, if not, the standard checkerboard pattern is sent. @@ -1192,12 +1423,12 @@ CLASS="APPLICATION" ads and other unwanted content.

The The filter action can perform a very similar task, by

8.5.3. crunch-incoming-cookies

8.5.3. crunch-incoming-cookies

outgoing cookies, use - crunch-outgoing-cookies. Use no sense at all to use this action in conjunction - with the session-cookies-only action, - since it would prevent the session cookies from being set. + since it would prevent the session cookies from being set. See also + filter-content-cookies.

8.5.4. crunch-outgoing-cookies

8.5.4. crunch-outgoing-cookies

incoming cookies, use - crunch-incoming-cookies. Use no sense at all to use this action in conjunction - with the session-cookies-only action, since it would prevent the session cookies from being read.

8.5.5. deanimate-gifs

8.5.5. deanimate-gifs

Text documents, including HTML and JavaScript, to which this action - applies, are filtered on-the-fly through the specified regular expression - based substitutions. +> All files of text-based type, most notably HTML and JavaScript, to which this + action applies, are filtered on-the-fly through the specified regular expression + based substitutions. (Note: as of version 3.0.3 plain text documents + are exempted from filtering, because web servers often use the + text/plain MIME type for all files whose type they + don't know.)

default.filter, set by the - filterfile option in the config file). Filtering - can be completely disabled without the use of parameters. +>). When used in its negative form, + and without parameters, filtering is completely disabled.

This is potentially a very powerful feature! But "rolling your own" - filters requires a knowledge of regular expressions and HTML. -

Filtering requires buffering the page content, which may appear to slow down page rendering since nothing is displayed until all content has passed the filters. (It does not really take longer, but seems that way @@ -1801,21 +2050,38 @@ CLASS="QUOTE" noticeable on slower connections.

This is very powerful feature, but "rolling your own" + filters requires a knowledge of regular expressions and HTML. +

The amount of data that can be filtered is limited to the - buffer-limit option in the main config file. The default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered - data, and all pending data, is passed through unfiltered. Inappropriate - MIME types are not filtered. + data, and all pending data, is passed through unfiltered. +

Inadequate MIME types, such as zipped files, are not filtered at all. + (Again, only text-based types except plain text). Encrypted SSL data + (from HTTPS servers) cannot be filtered either, since this would violate + the integrity of the secure transaction. In some situations it might + be necessary to protect certain text, like source code, from filtering + by defining appropriate -filter sections.

At this time, cannot (yet!) uncompress compressed documents. If you want filtering to work on all documents, even those that would normally be sent compressed, use the - prevent-compression - action in conjunction with filterfilter.

Filtering can achieve some of the same effects as the - block action, i.e. it can be used to block ads and banners. But the mechanism works quite differently. One effective use, is to block ad banners @@ -1857,16 +2123,32 @@ HREF="contact.html" > with suggestions for new or improved filters is particularly welcome!

The below list has only the names and a one-line description of each + predefined filter. There are more + verbose explanations of what these filters do in the filter file chapter. +

Example usage (with filters from the distribution default.filter file):
file). + See the Predefined Filters section for + more explanation on each:

+filter{html-annoyances}     # Get rid of particularly annoying HTML abuse.
+filter{js-annoyances} # Get rid of particularly annoying JavaScript abuse

+filter{js-annoyances}       # Get rid of particularly annoying JavaScript abuse
+filter{js-events} # Kill all JS event bindings (Radically destructive! Only for extra nasty sites)

+filter{banners-by-size}     # Kill banners based on their size for this page (very efficient!)
+filter{html-annoyances} # Get rid of particularly annoying HTML abuse

+filter{banners-by-link}     # Kill banners based on the link they are contained in (experimental)
+filter{content-cookies} # Kill cookies that come in the HTML or JS content

+filter{img-reorder}         # Reorder attributes in <img> tags to make the banners-by-* filters more effective
+filter{refresh-tags} # Kill automatic refresh tags (for dial-on-demand setups)

+filter{content-cookies}     # Kill cookies that come sneaking in the HTML or JS content
+filter{unsolicited-popups} # Disable only unsolicited pop-up windows

+filter{popups}              # Kill all popups in JS and HTML
+filter{all-popups} # Kill all popups in JavaScript and HTML

+filter{webbugs}             # Squish WebBugs (1x1 invisible GIFs used for user tracking)
+filter{img-reorder} # Reorder attributes in <img> tags to make the banners-by-* filters more effective

+filter{fun}                 # Text replacements for subversive browsing fun!
+filter{banners-by-size} # Kill banners by size

+filter{frameset-borders}    # Give frames a border and make them resizeable
+filter{banners-by-link} # Kill banners by their links to known clicktrackers
+>

+filter{refresh-tags}        # Kill automatic refresh tags (for dial-on-demand setups)
+filter{webbugs} # Squish WebBugs (1x1 invisible GIFs used for user tracking)

+filter{nimda}               # Remove Nimda (virus) code.
+filter{tiny-textforms} # Extend those tiny textareas up to 40x80 and kill the hard wrap

+filter{shockwave-flash}     # Kill embedded Shockwave Flash objects
+filter{jumping-windows} # Prevent windows from resizing and moving themselves

+filter{crude-parental}      # Kill all web pages that contain the words "sex" or "warez"
+filter{frameset-borders} # Give frames a border and make them resizable

+filter{js-events}           # Kill all JS event bindings (Radically destructive! Only for extra nasty sites) 
+filter{demoronizer} # Fix MS's non-standard use of standard charsets

+
+filter{shockwave-flash}     # Kill embedded Shockwave Flash objects
+

+
+filter{quicktime-kioskmode} # Make Quicktime movies saveable
+

+
+filter{fun}                 # Text replacements for subversive browsing fun!
+

+
+filter{crude-parental}      # Crude parental filtering (demo only)
+

+
+filter{ie-exploits}         # Disable some known Internet Explorer bug exploits
+

8.5.9. handle-as-image

8.5.9. handle-as-image

This action alone doesn't do anything noticeable. It just marks URLs as images. - If the block action "blocked" - page, or a replacement image (as determined by the set-image-blocker action) will be sent to the client as a substitute for the blocked content.

Users will probably only want to use the handle-as-image action in conjunction with - block, to block sources of banners, whose URLs don't reflect the file type, like in the second example section.

Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad frames require an HTML page to be sent, or they won't display properly. - Forcing handle-as-imagehandle-as-image in this situation will not replace the ad frame with an image, but lead to error messages.

8.5.10. hide-forwarded-for-headers

8.5.10. hide-forwarded-for-headers

8.5.11. hide-from-header

8.5.11. hide-from-header

"block" will completely remove the header - (not to be confused with the block action).

8.5.12. hide-referrer

8.5.12. hide-referrer

- hide-refererhide-referer is an alternate spelling of - hide-referrerhide-referrer and the two can be can be freely substituted with each other. (

8.5.13. hide-user-agent

8.5.13. hide-user-agent

Eliminate those annoying pop-up windows

Eliminate those annoying pop-up windows (deprecated)

Effect:
Notes:

This action is easily confused with the built-in, hardwired This action is basically a built-in, hardwired special-purpose filter + action, but there are important differences: For filter - action, but there are important differences: For kill-popupskill-popups, the document need not be buffered, so it can be incrementally rendered while - downloading. But kill-popupskill-popups doesn't catch as many pop-ups as - filter{filter{popups}all-popups} + does and is not as smart as filter{unsolicited-popups} - does. + is.

Think of it as a fast and efficient replacement for a filter that you can use if you don't want any filtering at all. Note that it doesn't make - sense to combine it with any filter action, - since as soon as one filter applies, the whole document needs to be buffered anyway, which destroys the advantage of - the kill-popupskill-popups action over its filter equivalent.

Killing all pop-ups is a dangerous business. Many shops and banks rely on - pop-ups to display forms, shopping carts etc, and killing only the unwanted pop-ups - would require artificial intelligence in Privoxy. - If the only kind of pop-ups that you want to kill are exit consoles (those +> Killing all pop-ups unconditionally is problematic. Many shops and banks rely on + pop-ups to display forms, shopping carts etc, and the filter{unsolicited-popups} + does a fairly good job of catching only the unwanted ones. +

If the only kind of pop-ups that you want to kill are exit consoles (those windows that appear when you close an other one), you might want to use - filter{{js-annoyances}js-annoyances} instead.

8.5.15. limit-connect

8.5.15. limit-connect

Notes:

By default, i.e. if no By default, i.e. if no limit-connectlimit-connect action applies, Privoxy only allows HTTP CONNECT requests to port 443 (the standard, secure HTTPS port). Use - limit-connectlimit-connect if more fine-grained control is desired for some or all destinations.

8.5.16. prevent-compression

8.5.16. prevent-compression

Ensure that servers send the content uncompressed, so it can be - passed through filters

More and more websites send their content compressed by default, which - is generally a good idea and saves bandwidth. But for the filter, , deanimate-gifs - and kill-popups actions to work,

This will slow down transfers from those websites, though. If you use any of the above-mentioned - actions, you will typically want to use prevent-compressionprevent-compression in conjunction with them.

Note that some (rare) ill-configured sites don't handle requests for uncompressed - documents correctly (they send an empty document body). If you use prevent-compressionprevent-compression per default, you'll have to add exceptions for those sites. See the example for how to do that.

8.5.17. send-vanilla-wafer

8.5.17. send-vanilla-wafer

8.5.18. send-wafer

8.5.18. send-wafer

A string of the form ""name=name=valuevalue".

8.5.19. session-cookies-only

8.5.19. session-cookies-only

Allow only temporary "session" cookies (for the current browser session cookies (for the current + browser session only). +>).

field from "Set-Cookie:" server headers. - Most browsers will not store such cookies permanently and forget them in between sessions. +> + server headers. Most browsers will not store such cookies permanently and + forget them in between sessions.

Notes:

This is less strict than This is less strict than crunch-incoming-cookies / - crunch-outgoing-cookies and allows you to browse websites that insist or rely on setting cookies, without compromising your privacy too badly.

Most browsers will not permanently store cookies that have been processed by - session-cookies-onlysession-cookies-only and will forget about them between sessions. This makes profiling cookies useless, but won't break sites which require cookies so that you can log in for transactions. This is generally turned on for all @@ -3387,23 +3780,23 @@ CLASS="emphasis" CLASS="EMPHASIS" >no sense at all to use to use session-cookies-onlysession-cookies-only - together with crunch-incoming-cookies or - crunch-outgoing-cookies. If you do, cookies will be plainly killed.

field. If you use an exotic browser, you might want to try it out to be sure.

This setting also has no effect on cookies that may have been stored + previously by the browser before starting Privoxy. + These would have to be removed manually. +

Privoxy also uses + the content-cookies filter + to block some types of cookies. Content cookies are not effected by + session-cookies-only. +

Example usage:

8.5.20. set-image-blocker

8.5.20. set-image-blocker

both - block and handle-as-image

""target-urltarget-url" to - send a redirect to target-urltarget-url. You can redirect to any image anywhere, even in your local filesystem (via Privoxy-built-in - URLs, which send the built-in images, as target-urltarget-url. This has the same visual effect as specifying

The URLs for the built-in images are "http://config.privoxy.org/send-banner?type="http://config.privoxy.org/send-banner?type=typetype", where , where typetype is either NOT to be - used in set-image-blockerset-image-blocker, but meant for use from filters

8.5.21. Summary

8.5.21. Summary

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 @@ -3716,7 +4126,9 @@ CLASS="SECT2" >

8.6. Aliases

8.6. Aliases

Custom crunch-incoming-cookies +crunch-outgoing-cookies + -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies block-as-image = +block +handle-as-image - mercy-for-cookies = -crunch-all-cookies -session-cookies-only + mercy-for-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} # These aliases define combinations of actions # that are useful for certain types of sites: # - fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups - shop = -crunch-all-cookies -filter{popups} -kill-popups + fragile = -block -filter -crunch-all-cookies -fast-redirects -hide-referrer -kill-popups + shop = -crunch-all-cookies -filter{all-popups} -kill-popups # Short names for other aliases, for really lazy people ;-) # @@ -3897,7 +4348,7 @@ CLASS="SCREEN" # These shops require pop-ups: # - {shop -kill-popups -filter{popups}} + {shop -kill-popups -filter{all-popups}} .dabs.com .overclockers.co.uk

8.7. Actions Files Tutorial

8.7. Actions Files Tutorial

The above chapters have shown

8.7.1. default.action

8.7.1. default.action

Every config file should start with a short comment stating its purpose:

crunch-incoming-cookies +crunch-outgoing-cookies + -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies + block-as-image = +block +handle-as-image + mercy-for-cookies = -crunch-all-cookies -session-cookies-only -filter{content-cookies} -# These aliases define combinations of actions -# that are useful for certain types of sites: -# -fragile = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups -shop = mercy-for-cookies -filter{popups} -kill-popupsblock -filter -crunch-all-cookies -fast-redirects -hide-referrer -kill-popups + shop = -crunch-all-cookies -filter{all-popups} -kill-popups The first regular section is probably the most important. It has only one pattern, ""//", but this pattern fast-redirects \ - +filter{html-annoyances} \ +filter{js-annoyances} \ -filter{content-cookies} \ - +filter{popups}filter{js-events} \ +filter{webbugs}filter{html-annoyances} \ -filter{content-cookies} \ + +filter{refresh-tags} \ + +filter{unsolicited-popups} \ -filter{fun}filter{all-popups} \ +filter{nimda}filter{img-reorder} \ +filter{banners-by-link} \ + +filter{webbugs} \ -filter{img-reorder}filter{tiny-textforms} \ + +filter{jumping-windows} \ + -filter{frameset-borders} \ + -filter{demoronizer} \ -filter{shockwave-flash} \ -filter{crude-parental}filter{quicktime-kioskmode} \ -filter{js-events}filter{fun} \ -filter{crude-parental} \ + +filter{ie-exploits} \ + -handle-as-image \ @@ -4255,9 +4773,7 @@ CLASS="EMPHASIS" > the default!) need exceptions, i.e. we need to specify explicitly what we - want to block in later sections. - We will also want to make exceptions from our general pop-up-killing, - and use our defined aliases for that.

The first of our specialized sections is concerned with fragilefragile alias instead of stating the list of actions explicitly:

Then, there are sites which rely on pop-up windows (yuck!) to work. - Since we made pop-up-killing our default above, we need to make exceptions - now. Mozilla users, who - can turn on smart handling of unwanted pop-ups in their browsers, can - safely choose - -filter{popups} (and - -kill-popups) above - and hence don't need this section. Anyway, disabling an already disabled - action doesn't hurt, so we'll define our exceptions regardless of what was - chosen in the defaults section:

# These sites require pop-ups too :( 
-#
-{ -kill-popups -filter{popups} }
-.dabs.com
-.overclockers.co.uk
-.deutsche-bank-24.de

The The fast-redirects action, which we enabled per default above, breaks some sites. So disable it for popular sites where we know it misbehaves:

and
- information). We can mark any URL as an image with the handle-as-image action, and marking all URLs that end in a known image file extension is a good start:

mark them as images in one go, with the help of our - block-as-imageblock-as-image alias defined above. (We could of - course just as well use +handle-as-image here.) Remember that the type of the replacement image is chosen by the - set-image-blocker action. Since all URLs have matched the default section with its - +set-image-blocker{pattern}{pattern} action before, it still applies and needn't be repeated:

"blocked" - by the filter{banners-by-size}{banners-by-size} action, which we enabled above, and which deletes the references to banner images from the pages while they are loaded, so the browser doesn't request them anymore, and hence they don't need to be blocked here. But this naturally doesn't catch all banners, and some people choose not to use filters, so we need a comprehensive list of patterns for banner URLs here, and apply the - block action to them.

First comes a bunch of generic patterns, which do most of the work, by @@ -4593,11 +5057,9 @@ count*. >

You wouldn't believe how many advertisers actually call their banner - servers ads.companycompany.com, or call the directory in which the banners are stored simply

But being very generic, they necessarily also catch URLs that we don't want - to block. The pattern .*ads..*ads. e.g. catches l.some-provider.net." So here come some - well-known exceptions to the +block section above.

"downloads.sourcefroge.net": Initially, all actions are deactivated, so it wouldn't get blocked. Then comes the defaults section, which matches the - URL, but just deactivates the block - action once again. Then it matches .*ads..*ads., an exception to the general non-blocking policy, and suddenly - +block applies. And now, it'll match - .*loads., where .*loads., where -block applies, so (unless it matches again further down) it ends up - with no block action applying.

"cvs" in them. Note that - -filter disables

8.7.2. user.action

8.7.2. user.action

So far we are painting with a broad brush by setting general policies, which would be a reasonable starting point for many people. Now, @@ -4860,29 +5324,46 @@ WIDTH="100%" >

# (Re-)define aliases for this file:
+># Aliases are local to the file they are defined in.
+# (Re-)define aliases for this file:
 #
 {{alias}}
+# 
+# These aliases just save typing later, and the alias names should 
+# be self explanatory.
+#
++crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
-mercy-for-cookies   = -crunch-all-cookies -session-cookies-only
-fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referer -kill-popups
-shop        = mercy-for-cookies -filter{popups} -kill-popups
-allow-ads   = -block -filter{banners-by-size} # (see below)
+

Say you have accounts on some sites that you visit regularly, and you don't want to have to log in manually each time. So you'd like to allow persistent cookies for these sites. The - mercy-for-cookiesallow-all-cookies alias defined above does exactly - that, i.e. it disables crunching of cookies in any direction, and - processing of cookies to make them temporary.

{ mercy-for-cookies }
+>{ allow-all-cookies }
+sourceforge.net
 sunsolve.sun.com
-slashdot.org
+.slashdot.org
 .yahoo.com
 .msdn.microsoft.com
 .redhat.com

Your bank needs popups and is allergic to some filter, but you don't - know which, so you disable them all:

Your bank is allergic to some filter, but you don't know which, so you disable them all:

{ -filter -kill-popups } .your-home-banking-site.com

While browsing the web with Privoxy you - noticed some ads that sneaked through, but you were too lazy to - report them through our fine and easy feedback Some file types you may not want to filter for various reasons:

# Technical documentation is likely to contain strings that might
+# erroneously get altered by the JavaScript-oriented filters:
+#
+.tldp.org
+/(.*/)?selfhtml/
+
+# And this stupid host sends streaming video with a wrong MIME type,
+# so that Privoxy thinks it is getting HTML and starts filtering:
+#
+stupid-server.example.com/

Example of a simple block action. Say you've + seen an ad on your favourite page on example.com that you want to get rid of. + You have right-clicked the image, selected "copy image location" - system, so you have added them here:

{ +block } section. Note that { +handle-as-image + } need not be specified, since all URLs ending in + .gif will be tagged as images by the general rules as set + in default.action anyway:

block } -www.a-popular-site.com/some/unobvious/path +www.example.com/nasty-ads/sponsor.gif another.popular.site.net/more/junk/here/

Note that, assuming the banners in the above example have regular image - extensions (most do), - The URLs of dynamically generated banners, especially from large banner + farms, often don't use the well-known image file name extensions, which + makes it impossible for Privoxy to guess + the file type just by looking at the URL. + You can use the +handle-as-image - need not be specified, since all URLs ending in these extensions will - already have been tagged as images in the relevant section of - default.action by now.

+block-as-image alias defined above for + these cases. + Note that objects which match this rule but then turn out NOT to be an + image are typically rendered as a "broken image" icon by the + browser. Use cautiously.

Then you noticed that the default configuration breaks Forbes Magazine, +>
{ +block-as-image }
+.doubleclick.net
+/Realmedia/ads/
+ar.atwola.com/

Now you noticed that the default configuration breaks Forbes Magazine, but you were too lazy to find out which action is the culprit, and you were again too lazy to give feedback, so - you just used the fragilefragile alias on the site, and - -- whoa! -- it worked:

whoa! -- it worked. The fragile + aliases disables those actions that are most likely to break a site. Also, + good for testing purposes to see if it is Privoxy + that is causing the problem or not.

"fun" filtering specified here.

Finally, you might think about how your favourite free websites are +> You might also worry about how your favourite free websites are funded, and find that they rely on displaying banner advertisements to survive. So you might want to specifically allow banners for those sites that you feel provide value to you:

Note that Note that allow-adsallow-ads has been aliased to - -block - , + -filter{banners-by-size} - above.

, and + -filter{banners-by-link} above.

user.action is generally the best place to define + exceptions and additions to the default policies of + default.action. Some actions are safe to have their + default policies set here though. So let's set a default policy to have a + "blank" image as opposed to the checkerboard pattern for + ALL sites. "/" of course matches all URL + paths and patterns:

{ +set-image-blocker{blank} }
+/ # ALL sites