Re-commit to fix various minor issues for new release.
[privoxy.git] / doc / webserver / user-manual / actions-file.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Actions Files</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9 REL="HOME"
10 TITLE="Privoxy 3.0.8 User Manual"
11 HREF="index.html"><LINK
12 REL="PREVIOUS"
13 TITLE="The Main Configuration File"
14 HREF="config.html"><LINK
15 REL="NEXT"
16 TITLE="Filter Files"
17 HREF="filter-file.html"><LINK
18 REL="STYLESHEET"
19 TYPE="text/css"
20 HREF="../p_doc.css">
21 <LINK REL="STYLESHEET" TYPE="text/css" HREF="p_doc.css">
22 </head
23 ><BODY
24 CLASS="SECT1"
25 BGCOLOR="#EEEEEE"
26 TEXT="#000000"
27 LINK="#0000FF"
28 VLINK="#840084"
29 ALINK="#0000FF"
30 ><DIV
31 CLASS="NAVHEADER"
32 ><TABLE
33 SUMMARY="Header navigation table"
34 WIDTH="100%"
35 BORDER="0"
36 CELLPADDING="0"
37 CELLSPACING="0"
38 ><TR
39 ><TH
40 COLSPAN="3"
41 ALIGN="center"
42 >Privoxy 3.0.8 User Manual</TH
43 ></TR
44 ><TR
45 ><TD
46 WIDTH="10%"
47 ALIGN="left"
48 VALIGN="bottom"
49 ><A
50 HREF="config.html"
51 ACCESSKEY="P"
52 >Prev</A
53 ></TD
54 ><TD
55 WIDTH="80%"
56 ALIGN="center"
57 VALIGN="bottom"
58 ></TD
59 ><TD
60 WIDTH="10%"
61 ALIGN="right"
62 VALIGN="bottom"
63 ><A
64 HREF="filter-file.html"
65 ACCESSKEY="N"
66 >Next</A
67 ></TD
68 ></TR
69 ></TABLE
70 ><HR
71 ALIGN="LEFT"
72 WIDTH="100%"></DIV
73 ><DIV
74 CLASS="SECT1"
75 ><H1
76 CLASS="SECT1"
77 ><A
78 NAME="ACTIONS-FILE"
79 >8. Actions Files</A
80 ></H1
81 ><P
82 > The actions files are used to define what <SPAN
83 CLASS="emphasis"
84 ><I
85 CLASS="EMPHASIS"
86 >actions</I
87 ></SPAN
88 >
89  <SPAN
90 CLASS="APPLICATION"
91 >Privoxy</SPAN
92 > takes for which URLs, and thus determines
93  how ad images, cookies and various other aspects of HTTP content and
94  transactions are handled, and on which sites (or even parts thereof). 
95  There are a number of such actions, with a wide range of functionality.
96  Each action does something a little different.
97  These actions give us a veritable arsenal of tools with which to exert 
98  our control, preferences and independence. Actions can be combined so that 
99  their effects are aggregated when applied against a given set of URLs.</P
100 ><P
101 > There 
102  are three action files included with <SPAN
103 CLASS="APPLICATION"
104 >Privoxy</SPAN
105 > with
106  differing purposes:
107  </P
108 ><P
109 >  <P
110 ></P
111 ><UL
112 ><LI
113 ><P
114 >     <TT
115 CLASS="FILENAME"
116 >default.action</TT
117 > - is the primary action file 
118      that sets the initial values for all actions. It is intended to 
119      provide a base level of functionality for
120      <SPAN
121 CLASS="APPLICATION"
122 >Privoxy's</SPAN
123 > array of features. So it is 
124      a set of broad rules that should work reasonably well as-is for most users.
125      This is the file that the developers are keeping updated, and <A
126 HREF="installation.html#INSTALLATION-KEEPUPDATED"
127 >making available to users</A
128 >.
129      The user's preferences as set in <TT
130 CLASS="FILENAME"
131 >standard.action</TT
132 >,
133      e.g. either <TT
134 CLASS="LITERAL"
135 >Cautious</TT
136 > (the default),
137      <TT
138 CLASS="LITERAL"
139 >Medium</TT
140 >, or <TT
141 CLASS="LITERAL"
142 >Advanced</TT
143 > (see
144      below).
145     </P
146 ></LI
147 ><LI
148 ><P
149 >     <TT
150 CLASS="FILENAME"
151 >user.action</TT
152 > - is intended to be for local site 
153      preferences and exceptions. As an example, if your ISP or your bank
154      has specific requirements, and need special handling, this kind of 
155      thing should go here. This file will not be upgraded.
156     </P
157 ></LI
158 ><LI
159 ><P
160 >     <TT
161 CLASS="FILENAME"
162 >standard.action</TT
163 > - is used only by the web based editor
164      at <A
165 HREF="http://config.privoxy.org/edit-actions-list?f=default"
166 TARGET="_top"
167 >     http://config.privoxy.org/edit-actions-list?f=default</A
168 >, 
169      to set various pre-defined sets of rules for the default actions section
170      in <TT
171 CLASS="FILENAME"
172 >default.action</TT
173 >. 
174      </P
175 ><P
176 >     <SPAN
177 CLASS="GUIBUTTON"
178 >Edit</SPAN
179 >  <SPAN
180 CLASS="GUIBUTTON"
181 >Set to Cautious</SPAN
182 > <SPAN
183 CLASS="GUIBUTTON"
184 >Set to Medium</SPAN
185 >  <SPAN
186 CLASS="GUIBUTTON"
187 >Set to Advanced</SPAN
188 >
189      </P
190 ><P
191 >     These have increasing levels of aggressiveness <SPAN
192 CLASS="emphasis"
193 ><I
194 CLASS="EMPHASIS"
195 >and have no
196      influence on your browsing unless you select them explicitly in the
197      editor</I
198 ></SPAN
199 >. A default installation should be pre-set to 
200      <TT
201 CLASS="LITERAL"
202 >Cautious</TT
203 > (versions prior to 3.0.5 were set to
204      <TT
205 CLASS="LITERAL"
206 >Medium</TT
207 >). New users should try this for a while before
208      adjusting the settings to more aggressive levels. The more aggressive 
209      the settings, then the more likelihood there is of problems such as sites 
210      not working as they should.
211      </P
212 ><P
213 >      The <SPAN
214 CLASS="GUIBUTTON"
215 >Edit</SPAN
216 > button allows you to turn each 
217       action on/off individually for fine-tuning. The <SPAN
218 CLASS="GUIBUTTON"
219 >Cautious</SPAN
220 >
221       button changes the actions list to low/safe settings which will activate 
222       ad blocking and a minimal set of <SPAN
223 CLASS="APPLICATION"
224 >Privoxy</SPAN
225 >'s features, and subsequently
226       there will be less of a chance for accidental problems. The
227       <SPAN
228 CLASS="GUIBUTTON"
229 >Medium</SPAN
230 > button sets the list to a medium level of
231       other features and a low level set of privacy features. The
232       <SPAN
233 CLASS="GUIBUTTON"
234 >Advanced</SPAN
235 > button sets the list to a high level of
236       ad blocking and medium level of privacy. See the chart below. The latter
237       three buttons over-ride any changes via with the
238       <SPAN
239 CLASS="GUIBUTTON"
240 >Edit</SPAN
241 > button. More fine-tuning can be done in the
242       lower sections of this internal page.
243      </P
244 ><P
245 >     It is not recommend to edit the <TT
246 CLASS="FILENAME"
247 >standard.action</TT
248 > file
249      itself.
250     </P
251 ><P
252 >     The default profiles, and their associated actions, as pre-defined in
253      <TT
254 CLASS="FILENAME"
255 >standard.action</TT
256 > are:
257     </P
258 ><P
259 >    <DIV
260 CLASS="TABLE"
261 ><A
262 NAME="AEN2176"
263 ></A
264 ><P
265 ><B
266 >Table 1. Default Configurations</B
267 ></P
268 ><TABLE
269 BORDER="1"
270 FRAME="border"
271 RULES="all"
272 CLASS="CALSTABLE"
273 ><COL
274 WIDTH="1*"
275 TITLE="C1"><COL
276 WIDTH="1*"
277 TITLE="C2"><COL
278 WIDTH="1*"
279 TITLE="C3"><COL
280 WIDTH="1*"
281 TITLE="C4"><THEAD
282 ><TR
283 ><TH
284 >Feature</TH
285 ><TH
286 >Cautious</TH
287 ><TH
288 >Medium</TH
289 ><TH
290 >Advanced</TH
291 ></TR
292 ></THEAD
293 ><TBODY
294 ><TR
295 ><TD
296 >Ad-blocking Aggressiveness</TD
297 ><TD
298 >medium</TD
299 ><TD
300 >high</TD
301 ><TD
302 >high</TD
303 ></TR
304 ><TR
305 ><TD
306 >Ad-filtering by size</TD
307 ><TD
308 >no</TD
309 ><TD
310 >yes</TD
311 ><TD
312 >yes</TD
313 ></TR
314 ><TR
315 ><TD
316 >Ad-filtering by link</TD
317 ><TD
318 >no</TD
319 ><TD
320 >no</TD
321 ><TD
322 >yes</TD
323 ></TR
324 ><TR
325 ><TD
326 >Pop-up killing</TD
327 ><TD
328 >blocks only</TD
329 ><TD
330 >blocks only</TD
331 ><TD
332 >blocks only</TD
333 ></TR
334 ><TR
335 ><TD
336 >Privacy Features</TD
337 ><TD
338 >low</TD
339 ><TD
340 >medium</TD
341 ><TD
342 >medium/high</TD
343 ></TR
344 ><TR
345 ><TD
346 >Cookie handling</TD
347 ><TD
348 >none</TD
349 ><TD
350 >session-only</TD
351 ><TD
352 >kill</TD
353 ></TR
354 ><TR
355 ><TD
356 >Referer forging</TD
357 ><TD
358 >no</TD
359 ><TD
360 >yes</TD
361 ><TD
362 >yes</TD
363 ></TR
364 ><TR
365 ><TD
366 >GIF de-animation</TD
367 ><TD
368 >no</TD
369 ><TD
370 >yes</TD
371 ><TD
372 >yes</TD
373 ></TR
374 ><TR
375 ><TD
376 >Fast redirects</TD
377 ><TD
378 >no</TD
379 ><TD
380 >no</TD
381 ><TD
382 >yes</TD
383 ></TR
384 ><TR
385 ><TD
386 >HTML taming</TD
387 ><TD
388 >no</TD
389 ><TD
390 >no</TD
391 ><TD
392 >yes</TD
393 ></TR
394 ><TR
395 ><TD
396 >JavaScript taming</TD
397 ><TD
398 >no</TD
399 ><TD
400 >no</TD
401 ><TD
402 >yes</TD
403 ></TR
404 ><TR
405 ><TD
406 >Web-bug killing</TD
407 ><TD
408 >no</TD
409 ><TD
410 >yes</TD
411 ><TD
412 >yes</TD
413 ></TR
414 ><TR
415 ><TD
416 >Image tag reordering</TD
417 ><TD
418 >no</TD
419 ><TD
420 >no</TD
421 ><TD
422 >yes</TD
423 ></TR
424 ></TBODY
425 ></TABLE
426 ></DIV
427 >
428     </P
429 ></LI
430 ></UL
431 >
432  </P
433 ><P
434 > The list of actions files to be used are defined in the main configuration 
435  file, and are processed in the order they are defined (e.g.
436  <TT
437 CLASS="FILENAME"
438 >default.action</TT
439 > is typically processed before
440  <TT
441 CLASS="FILENAME"
442 >user.action</TT
443 >). The content of these can all be viewed and
444  edited from <A
445 HREF="http://config.privoxy.org/show-status"
446 TARGET="_top"
447 >http://config.privoxy.org/show-status</A
448 >.
449  The over-riding principle when applying actions, is that the last action that
450  matches a given URL wins. The broadest, most general rules go first
451  (defined in <TT
452 CLASS="FILENAME"
453 >default.action</TT
454 >),
455  followed by any exceptions (typically also in
456  <TT
457 CLASS="FILENAME"
458 >default.action</TT
459 >), which are then followed lastly by any
460  local preferences (typically in <SPAN
461 CLASS="emphasis"
462 ><I
463 CLASS="EMPHASIS"
464 >user</I
465 ></SPAN
466 ><TT
467 CLASS="FILENAME"
468 >.action</TT
469 >). 
470  Generally, <TT
471 CLASS="FILENAME"
472 >user.action</TT
473 > has the last word.
474  </P
475 ><P
476 > An actions file typically has multiple sections. If you want to use
477  <SPAN
478 CLASS="QUOTE"
479 >"aliases"</SPAN
480 > in an actions file, you have to place the (optional)
481  <A
482 HREF="actions-file.html#ALIASES"
483 >alias section</A
484 > at the top of that file.
485  Then comes the default set of rules which will apply universally to all
486  sites and pages (be <SPAN
487 CLASS="emphasis"
488 ><I
489 CLASS="EMPHASIS"
490 >very careful</I
491 ></SPAN
492 > with using such a
493  universal set in <TT
494 CLASS="FILENAME"
495 >user.action</TT
496 > or any other actions file after 
497  <TT
498 CLASS="FILENAME"
499 >default.action</TT
500 >, because it will override the result
501  from consulting any previous file). And then below that,
502  exceptions to the defined universal policies. You can regard
503  <TT
504 CLASS="FILENAME"
505 >user.action</TT
506 > as an appendix to <TT
507 CLASS="FILENAME"
508 >default.action</TT
509 >,
510  with the advantage that it is a separate file, which makes preserving your
511  personal settings across <SPAN
512 CLASS="APPLICATION"
513 >Privoxy</SPAN
514 > upgrades easier.</P
515 ><P
516
517  Actions can be used to block anything you want, including ads, banners, or
518  just some obnoxious URL whose content you would rather not see. Cookies can be accepted
519  or rejected, or accepted only during the current browser session (i.e. not
520  written to disk), content can be modified, some JavaScripts tamed, user-tracking
521  fooled, and much more. See below for a <A
522 HREF="actions-file.html#ACTIONS"
523 >complete list
524  of actions</A
525 >.</P
526 ><DIV
527 CLASS="SECT2"
528 ><H2
529 CLASS="SECT2"
530 ><A
531 NAME="AEN2275"
532 >8.1. Finding the Right Mix</A
533 ></H2
534 ><P
535 > Note that some <A
536 HREF="actions-file.html#ACTIONS"
537 >actions</A
538 >, like cookie suppression
539  or script disabling, may render some sites unusable that rely on these
540  techniques to work properly. Finding the right mix of actions is not always easy and
541  certainly a matter of personal taste. And, things can always change, requiring 
542  refinements in the configuration. In general, it can be said that the more
543  <SPAN
544 CLASS="QUOTE"
545 >"aggressive"</SPAN
546 > your default settings (in the top section of the
547  actions file) are, the more exceptions for <SPAN
548 CLASS="QUOTE"
549 >"trusted"</SPAN
550 > sites you
551  will have to make later. If, for example, you want to crunch all cookies per
552  default, you'll have to make exceptions from that rule for sites that you
553  regularly use and that require cookies for actually useful purposes, like maybe
554  your bank, favorite shop, or newspaper.</P
555 ><P
556 > We have tried to provide you with reasonable rules to start from in the
557  distribution actions files. But there is no general rule of thumb on these
558  things. There just are too many variables, and sites are constantly changing.
559  Sooner or later you will want to change the rules (and read this chapter again :).</P
560 ></DIV
561 ><DIV
562 CLASS="SECT2"
563 ><H2
564 CLASS="SECT2"
565 ><A
566 NAME="AEN2282"
567 >8.2. How to Edit</A
568 ></H2
569 ><P
570 > The easiest way to edit the actions files is with a browser by
571  using our browser-based editor, which can be reached from <A
572 HREF="http://config.privoxy.org/show-status"
573 TARGET="_top"
574 >http://config.privoxy.org/show-status</A
575 >.
576  Note: the config file option <A
577 HREF="config.html#ENABLE-EDIT-ACTIONS"
578 >enable-edit-actions</A
579 > must be enabled for
580  this to work. The editor allows both fine-grained control over every single
581  feature on a per-URL basis, and easy choosing from wholesale sets of defaults
582  like <SPAN
583 CLASS="QUOTE"
584 >"Cautious"</SPAN
585 >, <SPAN
586 CLASS="QUOTE"
587 >"Medium"</SPAN
588 > or
589  <SPAN
590 CLASS="QUOTE"
591 >"Advanced"</SPAN
592 >. Warning: the <SPAN
593 CLASS="QUOTE"
594 >"Advanced"</SPAN
595 > setting is more
596  aggressive, and will be more likely to cause problems for some sites.
597  Experienced users only! 
598  </P
599 ><P
600 > If you prefer plain text editing to GUIs, you can of course also directly edit the
601  the actions files with your favorite text editor. Look at
602  <TT
603 CLASS="FILENAME"
604 >default.action</TT
605 > which is richly commented with many 
606  good examples.</P
607 ></DIV
608 ><DIV
609 CLASS="SECT2"
610 ><H2
611 CLASS="SECT2"
612 ><A
613 NAME="ACTIONS-APPLY"
614 >8.3. How Actions are Applied to Requests</A
615 ></H2
616 ><P
617 > Actions files are divided into sections. There are special sections,
618  like the <SPAN
619 CLASS="QUOTE"
620 >"<A
621 HREF="actions-file.html#ALIASES"
622 >alias</A
623 >"</SPAN
624 > sections which will
625  be discussed later. For now let's concentrate on regular sections: They have a
626  heading line (often split up to multiple lines for readability) which consist
627  of a list of actions, separated by whitespace and enclosed in curly braces.
628  Below that, there is a list of URL and tag patterns, each on a separate line.</P
629 ><P
630 > To determine which actions apply to a request, the URL of the request is
631  compared to all URL patterns in each <SPAN
632 CLASS="QUOTE"
633 >"action file"</SPAN
634 >.
635  Every time it matches, the list of applicable actions for the request is
636  incrementally updated, using the heading of the section in which the
637  pattern is located. The same is done again for tags and tag patterns later on.</P
638 ><P
639 > If multiple applying sections set the same action differently,
640  the last match wins. If not, the effects are aggregated.
641  E.g. a URL might match a regular section with a heading line of <TT
642 CLASS="LITERAL"
643 >{ 
644  +<A
645 HREF="actions-file.html#HANDLE-AS-IMAGE"
646 >handle-as-image</A
647 > }</TT
648 >,
649  then later another one with just <TT
650 CLASS="LITERAL"
651 >{
652  +<A
653 HREF="actions-file.html#BLOCK"
654 >block</A
655 > }</TT
656 >, resulting
657  in <SPAN
658 CLASS="emphasis"
659 ><I
660 CLASS="EMPHASIS"
661 >both</I
662 ></SPAN
663 > actions to apply. And there may well be 
664  cases where you will want to combine actions together. Such a section then 
665  might look like:</P
666 ><P
667 > <TABLE
668 BORDER="0"
669 BGCOLOR="#E0E0E0"
670 WIDTH="100%"
671 ><TR
672 ><TD
673 ><PRE
674 CLASS="SCREEN"
675 >  { +<TT
676 CLASS="LITERAL"
677 >handle-as-image</TT
678 >  +<TT
679 CLASS="LITERAL"
680 >block</TT
681 > }
682   # Block these as if they were images. Send no block page.
683    banners.example.com
684    media.example.com/.*banners
685    .example.com/images/ads/</PRE
686 ></TD
687 ></TR
688 ></TABLE
689 >
690  </P
691 ><P
692 > You can trace this process for URL patterns and any given URL by visiting <A
693 HREF="http://config.privoxy.org/show-url-info"
694 TARGET="_top"
695 >http://config.privoxy.org/show-url-info</A
696 >.</P
697 ><P
698 > Examples and more detail on this is provided in the Appendix, <A
699 HREF="appendix.html#ACTIONSANAT"
700 > Troubleshooting: Anatomy of an Action</A
701 > section.</P
702 ></DIV
703 ><DIV
704 CLASS="SECT2"
705 ><H2
706 CLASS="SECT2"
707 ><A
708 NAME="AF-PATTERNS"
709 >8.4. Patterns</A
710 ></H2
711 ><P
712
713  As mentioned, <SPAN
714 CLASS="APPLICATION"
715 >Privoxy</SPAN
716 > uses <SPAN
717 CLASS="QUOTE"
718 >"patterns"</SPAN
719 >
720  to determine what <SPAN
721 CLASS="emphasis"
722 ><I
723 CLASS="EMPHASIS"
724 >actions</I
725 ></SPAN
726 > might apply to which sites and
727  pages your browser attempts to access. These <SPAN
728 CLASS="QUOTE"
729 >"patterns"</SPAN
730 > use wild
731  card type <SPAN
732 CLASS="emphasis"
733 ><I
734 CLASS="EMPHASIS"
735 >pattern</I
736 ></SPAN
737 > matching to achieve a high degree of
738  flexibility. This allows one expression to be expanded and potentially match
739  against many similar patterns.</P
740 ><P
741 > Generally, an URL pattern has the form
742  <TT
743 CLASS="LITERAL"
744 >&#60;domain&#62;/&#60;path&#62;</TT
745 >, where both the
746  <TT
747 CLASS="LITERAL"
748 >&#60;domain&#62;</TT
749 > and <TT
750 CLASS="LITERAL"
751 >&#60;path&#62;</TT
752 > are
753  optional. (This is why the special <TT
754 CLASS="LITERAL"
755 >/</TT
756 > pattern matches all
757  URLs). Note that the protocol portion of the URL pattern (e.g.
758  <TT
759 CLASS="LITERAL"
760 >http://</TT
761 >) should <SPAN
762 CLASS="emphasis"
763 ><I
764 CLASS="EMPHASIS"
765 >not</I
766 ></SPAN
767 > be included in
768  the pattern. This is assumed already!</P
769 ><P
770 > The pattern matching syntax is different for the domain and path parts of
771  the URL. The domain part uses a simple globbing type matching technique, 
772  while the path part uses a more flexible 
773  <A
774 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
775 TARGET="_top"
776 ><SPAN
777 CLASS="QUOTE"
778 >"Regular
779   Expressions (PCRE)"</SPAN
780 ></A
781 > based syntax.</P
782 ><P
783 ></P
784 ><DIV
785 CLASS="VARIABLELIST"
786 ><DL
787 ><DT
788 ><TT
789 CLASS="LITERAL"
790 >www.example.com/</TT
791 ></DT
792 ><DD
793 ><P
794 >    is a domain-only pattern and will match any request to <TT
795 CLASS="LITERAL"
796 >www.example.com</TT
797 >,
798     regardless of which document on that server is requested. So ALL pages in
799     this domain would be covered by the scope of this action. Note that a 
800     simple <TT
801 CLASS="LITERAL"
802 >example.com</TT
803 > is different and would NOT match.
804    </P
805 ></DD
806 ><DT
807 ><TT
808 CLASS="LITERAL"
809 >www.example.com</TT
810 ></DT
811 ><DD
812 ><P
813 >    means exactly the same. For domain-only patterns, the trailing <TT
814 CLASS="LITERAL"
815 >/</TT
816 > may
817     be omitted.
818    </P
819 ></DD
820 ><DT
821 ><TT
822 CLASS="LITERAL"
823 >www.example.com/index.html$</TT
824 ></DT
825 ><DD
826 ><P
827 >    matches all the documents on <TT
828 CLASS="LITERAL"
829 >www.example.com</TT
830 >
831     whose name starts with <TT
832 CLASS="LITERAL"
833 >/index.html</TT
834 >.
835    </P
836 ></DD
837 ><DT
838 ><TT
839 CLASS="LITERAL"
840 >www.example.com/index.html$</TT
841 ></DT
842 ><DD
843 ><P
844 >    matches only the single document <TT
845 CLASS="LITERAL"
846 >/index.html</TT
847 >
848     on <TT
849 CLASS="LITERAL"
850 >www.example.com</TT
851 >.
852    </P
853 ></DD
854 ><DT
855 ><TT
856 CLASS="LITERAL"
857 >/index.html$</TT
858 ></DT
859 ><DD
860 ><P
861 >    matches the document <TT
862 CLASS="LITERAL"
863 >/index.html</TT
864 >, regardless of the domain,
865     i.e. on <SPAN
866 CLASS="emphasis"
867 ><I
868 CLASS="EMPHASIS"
869 >any</I
870 ></SPAN
871 > web server anywhere.
872    </P
873 ></DD
874 ><DT
875 ><TT
876 CLASS="LITERAL"
877 >index.html</TT
878 ></DT
879 ><DD
880 ><P
881 >    matches nothing, since it would be interpreted as a domain name and
882     there is no top-level domain called <TT
883 CLASS="LITERAL"
884 >.html</TT
885 >. So its 
886     a mistake.
887    </P
888 ></DD
889 ></DL
890 ></DIV
891 ><DIV
892 CLASS="SECT3"
893 ><H3
894 CLASS="SECT3"
895 ><A
896 NAME="AEN2373"
897 >8.4.1. The Domain Pattern</A
898 ></H3
899 ><P
900 > The matching of the domain part offers some flexible options: if the
901  domain starts or ends with a dot, it becomes unanchored at that end. 
902  For example:</P
903 ><P
904 ></P
905 ><DIV
906 CLASS="VARIABLELIST"
907 ><DL
908 ><DT
909 ><TT
910 CLASS="LITERAL"
911 >.example.com</TT
912 ></DT
913 ><DD
914 ><P
915 >    matches any domain with first-level domain <TT
916 CLASS="LITERAL"
917 >com</TT
918 >
919     and second-level domain <TT
920 CLASS="LITERAL"
921 >example</TT
922 >.
923     For example <TT
924 CLASS="LITERAL"
925 >www.example.com</TT
926 >,
927     <TT
928 CLASS="LITERAL"
929 >example.com</TT
930 > and <TT
931 CLASS="LITERAL"
932 >foo.bar.baz.example.com</TT
933 >.
934     Note that it wouldn't match if the second-level domain was <TT
935 CLASS="LITERAL"
936 >another-example</TT
937 >.
938    </P
939 ></DD
940 ><DT
941 ><TT
942 CLASS="LITERAL"
943 >www.</TT
944 ></DT
945 ><DD
946 ><P
947 >    matches any domain that <SPAN
948 CLASS="emphasis"
949 ><I
950 CLASS="EMPHASIS"
951 >STARTS</I
952 ></SPAN
953 > with
954     <TT
955 CLASS="LITERAL"
956 >www.</TT
957 > (It also matches the domain
958     <TT
959 CLASS="LITERAL"
960 >www</TT
961 > but most of the time that doesn't matter.)
962    </P
963 ></DD
964 ><DT
965 ><TT
966 CLASS="LITERAL"
967 >.example.</TT
968 ></DT
969 ><DD
970 ><P
971 >    matches any domain that <SPAN
972 CLASS="emphasis"
973 ><I
974 CLASS="EMPHASIS"
975 >CONTAINS</I
976 ></SPAN
977 > <TT
978 CLASS="LITERAL"
979 >.example.</TT
980 >.
981     And, by the way, also included would be any files or documents that exist
982     within that domain since no path limitations are specified. (Correctly
983     speaking: It matches any FQDN that contains <TT
984 CLASS="LITERAL"
985 >example</TT
986 > as
987     a domain.) This might be <TT
988 CLASS="LITERAL"
989 >www.example.com</TT
990 >,
991     <TT
992 CLASS="LITERAL"
993 >news.example.de</TT
994 >, or
995     <TT
996 CLASS="LITERAL"
997 >www.example.net/cgi/testing.pl</TT
998 > for instance. All these
999     cases are matched. 
1000    </P
1001 ></DD
1002 ></DL
1003 ></DIV
1004 ><P
1005 > Additionally, there are wild-cards that you can use in the domain names
1006  themselves. These work similarly to shell globbing type wild-cards:
1007  <SPAN
1008 CLASS="QUOTE"
1009 >"*"</SPAN
1010 > represents zero or more arbitrary characters (this is
1011  equivalent to the 
1012  <A
1013 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1014 TARGET="_top"
1015 ><SPAN
1016 CLASS="QUOTE"
1017 >"Regular
1018  Expression"</SPAN
1019 ></A
1020 > based syntax of <SPAN
1021 CLASS="QUOTE"
1022 >".*"</SPAN
1023 >),
1024  <SPAN
1025 CLASS="QUOTE"
1026 >"?"</SPAN
1027 >  represents any single character (this is equivalent to the
1028  regular expression syntax of a simple <SPAN
1029 CLASS="QUOTE"
1030 >"."</SPAN
1031 >), and you can define
1032  <SPAN
1033 CLASS="QUOTE"
1034 >"character classes"</SPAN
1035 > in square brackets which is similar to 
1036  the same regular expression technique. All of this can be freely mixed:</P
1037 ><P
1038 ></P
1039 ><DIV
1040 CLASS="VARIABLELIST"
1041 ><DL
1042 ><DT
1043 ><TT
1044 CLASS="LITERAL"
1045 >ad*.example.com</TT
1046 ></DT
1047 ><DD
1048 ><P
1049 >    matches <SPAN
1050 CLASS="QUOTE"
1051 >"adserver.example.com"</SPAN
1052 >, 
1053     <SPAN
1054 CLASS="QUOTE"
1055 >"ads.example.com"</SPAN
1056 >, etc but not <SPAN
1057 CLASS="QUOTE"
1058 >"sfads.example.com"</SPAN
1059 >
1060    </P
1061 ></DD
1062 ><DT
1063 ><TT
1064 CLASS="LITERAL"
1065 >*ad*.example.com</TT
1066 ></DT
1067 ><DD
1068 ><P
1069 >    matches all of the above, and then some.
1070    </P
1071 ></DD
1072 ><DT
1073 ><TT
1074 CLASS="LITERAL"
1075 >.?pix.com</TT
1076 ></DT
1077 ><DD
1078 ><P
1079 >    matches <TT
1080 CLASS="LITERAL"
1081 >www.ipix.com</TT
1082 >,
1083     <TT
1084 CLASS="LITERAL"
1085 >pictures.epix.com</TT
1086 >, <TT
1087 CLASS="LITERAL"
1088 >a.b.c.d.e.upix.com</TT
1089 > etc. 
1090    </P
1091 ></DD
1092 ><DT
1093 ><TT
1094 CLASS="LITERAL"
1095 >www[1-9a-ez].example.c*</TT
1096 ></DT
1097 ><DD
1098 ><P
1099 >     matches <TT
1100 CLASS="LITERAL"
1101 >www1.example.com</TT
1102 >, 
1103      <TT
1104 CLASS="LITERAL"
1105 >www4.example.cc</TT
1106 >, <TT
1107 CLASS="LITERAL"
1108 >wwwd.example.cy</TT
1109 >, 
1110      <TT
1111 CLASS="LITERAL"
1112 >wwwz.example.com</TT
1113 > etc., but <SPAN
1114 CLASS="emphasis"
1115 ><I
1116 CLASS="EMPHASIS"
1117 >not</I
1118 ></SPAN
1119
1120      <TT
1121 CLASS="LITERAL"
1122 >wwww.example.com</TT
1123 >.
1124    </P
1125 ></DD
1126 ></DL
1127 ></DIV
1128 ><P
1129 > While flexible, this is not the sophistication of full regular expression based syntax.</P
1130 ></DIV
1131 ><DIV
1132 CLASS="SECT3"
1133 ><H3
1134 CLASS="SECT3"
1135 ><A
1136 NAME="AEN2449"
1137 >8.4.2. The Path Pattern</A
1138 ></H3
1139 ><P
1140 > <SPAN
1141 CLASS="APPLICATION"
1142 >Privoxy</SPAN
1143 > uses Perl compatible (PCRE)
1144   <A
1145 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
1146 TARGET="_top"
1147 ><SPAN
1148 CLASS="QUOTE"
1149 >"Regular
1150   Expression"</SPAN
1151 ></A
1152 > based syntax 
1153  (through the <A
1154 HREF="http://www.pcre.org/"
1155 TARGET="_top"
1156 >PCRE</A
1157 > library) for
1158  matching the path portion (after the slash), and is thus more flexible.</P
1159 ><P
1160 > There is an <A
1161 HREF="appendix.html#REGEX"
1162 >Appendix</A
1163 > with a brief quick-start into regular
1164  expressions, and full (very technical) documentation on PCRE regex syntax is available on-line
1165  at <A
1166 HREF="http://www.pcre.org/man.txt"
1167 TARGET="_top"
1168 >http://www.pcre.org/man.txt</A
1169 >.
1170  You might also find the Perl man page on regular expressions (<TT
1171 CLASS="LITERAL"
1172 >man perlre</TT
1173 >)
1174  useful, which is available on-line at <A
1175 HREF="http://perldoc.perl.org/perlre.html"
1176 TARGET="_top"
1177 >http://perldoc.perl.org/perlre.html</A
1178 >.</P
1179 ><P
1180 > Note that the path pattern is automatically left-anchored at the <SPAN
1181 CLASS="QUOTE"
1182 >"/"</SPAN
1183 >,
1184  i.e. it matches as if it would start with a <SPAN
1185 CLASS="QUOTE"
1186 >"^"</SPAN
1187 > (regular expression speak 
1188  for the beginning of a line).</P
1189 ><P
1190 > Please also note that matching in the path is <SPAN
1191 CLASS="emphasis"
1192 ><I
1193 CLASS="EMPHASIS"
1194 >CASE INSENSITIVE</I
1195 ></SPAN
1196 >
1197  by default, but you can switch to case sensitive at any point in the pattern by using the 
1198  <SPAN
1199 CLASS="QUOTE"
1200 >"(?-i)"</SPAN
1201 > switch: <TT
1202 CLASS="LITERAL"
1203 >www.example.com/(?-i)PaTtErN.*</TT
1204 > will match
1205  only documents whose path starts with <TT
1206 CLASS="LITERAL"
1207 >PaTtErN</TT
1208 > in
1209  <SPAN
1210 CLASS="emphasis"
1211 ><I
1212 CLASS="EMPHASIS"
1213 >exactly</I
1214 ></SPAN
1215 > this capitalization.</P
1216 ><P
1217 ></P
1218 ><DIV
1219 CLASS="VARIABLELIST"
1220 ><DL
1221 ><DT
1222 ><TT
1223 CLASS="LITERAL"
1224 >.example.com/.*</TT
1225 ></DT
1226 ><DD
1227 ><P
1228 >     Is equivalent to just <SPAN
1229 CLASS="QUOTE"
1230 >".example.com"</SPAN
1231 >, since any documents 
1232      within that domain are matched with or without the <SPAN
1233 CLASS="QUOTE"
1234 >".*"</SPAN
1235 >
1236      regular expression. This is redundant
1237    </P
1238 ></DD
1239 ><DT
1240 ><TT
1241 CLASS="LITERAL"
1242 >.example.com/.*/index.html$</TT
1243 ></DT
1244 ><DD
1245 ><P
1246 >    Will match any page in the domain of <SPAN
1247 CLASS="QUOTE"
1248 >"example.com"</SPAN
1249 > that is
1250     named <SPAN
1251 CLASS="QUOTE"
1252 >"index.html"</SPAN
1253 >, and that is part of some path. For
1254     example, it matches <SPAN
1255 CLASS="QUOTE"
1256 >"www.example.com/testing/index.html"</SPAN
1257 > but
1258     NOT <SPAN
1259 CLASS="QUOTE"
1260 >"www.example.com/index.html"</SPAN
1261 > because the regular
1262     expression called for at least two <SPAN
1263 CLASS="QUOTE"
1264 >"/'s"</SPAN
1265 >, thus the path 
1266     requirement. It also would match 
1267     <SPAN
1268 CLASS="QUOTE"
1269 >"www.example.com/testing/index_html"</SPAN
1270 >, because of the 
1271     special meta-character <SPAN
1272 CLASS="QUOTE"
1273 >"."</SPAN
1274 >.
1275    </P
1276 ></DD
1277 ><DT
1278 ><TT
1279 CLASS="LITERAL"
1280 >.example.com/(.*/)?index\.html$</TT
1281 ></DT
1282 ><DD
1283 ><P
1284 >    This regular expression is conditional so it will match any page 
1285     named <SPAN
1286 CLASS="QUOTE"
1287 >"index.html"</SPAN
1288 > regardless of path which in this case can 
1289     have one or more <SPAN
1290 CLASS="QUOTE"
1291 >"/'s"</SPAN
1292 >. And this one must contain exactly 
1293     <SPAN
1294 CLASS="QUOTE"
1295 >".html"</SPAN
1296 > (but does not have to end with that!).
1297    </P
1298 ></DD
1299 ><DT
1300 ><TT
1301 CLASS="LITERAL"
1302 >.example.com/(.*/)(ads|banners?|junk)</TT
1303 ></DT
1304 ><DD
1305 ><P
1306 >    This regular expression will match any path of <SPAN
1307 CLASS="QUOTE"
1308 >"example.com"</SPAN
1309 >
1310     that contains any of the words <SPAN
1311 CLASS="QUOTE"
1312 >"ads"</SPAN
1313 >, <SPAN
1314 CLASS="QUOTE"
1315 >"banner"</SPAN
1316 >, 
1317     <SPAN
1318 CLASS="QUOTE"
1319 >"banners"</SPAN
1320 > (because of the <SPAN
1321 CLASS="QUOTE"
1322 >"?"</SPAN
1323 >) or <SPAN
1324 CLASS="QUOTE"
1325 >"junk"</SPAN
1326 >.
1327     The path does not have to end in these words, just contain them.
1328    </P
1329 ></DD
1330 ><DT
1331 ><TT
1332 CLASS="LITERAL"
1333 >.example.com/(.*/)(ads|banners?|junk)/.*\.(jpe?g|gif|png)$</TT
1334 ></DT
1335 ><DD
1336 ><P
1337 >    This is very much the same as above, except now it must end in either 
1338     <SPAN
1339 CLASS="QUOTE"
1340 >".jpg"</SPAN
1341 >, <SPAN
1342 CLASS="QUOTE"
1343 >".jpeg"</SPAN
1344 >, <SPAN
1345 CLASS="QUOTE"
1346 >".gif"</SPAN
1347 > or <SPAN
1348 CLASS="QUOTE"
1349 >".png"</SPAN
1350 >. So this 
1351     one is limited to common image formats.
1352    </P
1353 ></DD
1354 ></DL
1355 ></DIV
1356 ><P
1357 > There are many, many good examples to be found in <TT
1358 CLASS="FILENAME"
1359 >default.action</TT
1360 >, 
1361  and more tutorials below in <A
1362 HREF="appendix.html#REGEX"
1363 >Appendix on regular expressions</A
1364 >.</P
1365 ></DIV
1366 ><DIV
1367 CLASS="SECT3"
1368 ><H3
1369 CLASS="SECT3"
1370 ><A
1371 NAME="TAG-PATTERN"
1372 >8.4.3. The Tag Pattern</A
1373 ></H3
1374 ><P
1375 > Tag patterns are used to change the applying actions based on the
1376  request's tags. Tags can be created with either the
1377  <A
1378 HREF="actions-file.html#CLIENT-HEADER-TAGGER"
1379 >client-header-tagger</A
1380 >
1381  or the  <A
1382 HREF="actions-file.html#SERVER-HEADER-TAGGER"
1383 >server-header-tagger</A
1384 > action.</P
1385 ><P
1386 > Tag patterns have to start with <SPAN
1387 CLASS="QUOTE"
1388 >"TAG:"</SPAN
1389 >, so <SPAN
1390 CLASS="APPLICATION"
1391 >Privoxy</SPAN
1392 >
1393  can tell them apart from URL patterns. Everything after the colon
1394  including white space, is interpreted as a regular expression with
1395  path pattern syntax, except that tag patterns aren't left-anchored
1396  automatically (<SPAN
1397 CLASS="APPLICATION"
1398 >Privoxy</SPAN
1399 > doesn't silently add a <SPAN
1400 CLASS="QUOTE"
1401 >"^"</SPAN
1402 >,
1403  you have to do it yourself if you need it).</P
1404 ><P
1405 > To match all requests that are tagged with <SPAN
1406 CLASS="QUOTE"
1407 >"foo"</SPAN
1408 >
1409  your pattern line should be <SPAN
1410 CLASS="QUOTE"
1411 >"TAG:^foo$"</SPAN
1412 >,
1413  <SPAN
1414 CLASS="QUOTE"
1415 >"TAG:foo"</SPAN
1416 > would work as well, but it would also
1417  match requests whose tags contain <SPAN
1418 CLASS="QUOTE"
1419 >"foo"</SPAN
1420 > somewhere.
1421  <SPAN
1422 CLASS="QUOTE"
1423 >"TAG: foo"</SPAN
1424 > wouldn't work as it requires white space.</P
1425 ><P
1426 > Sections can contain URL and tag patterns at the same time,
1427  but tag patterns are checked after the URL patterns and thus
1428  always overrule them, even if they are located before the URL patterns.</P
1429 ><P
1430 > Once a new tag is added, Privoxy checks right away if it's matched by one
1431  of the tag patterns and updates the action settings accordingly. As a result
1432  tags can be used to activate other tagger actions, as long as these other
1433  taggers look for headers that haven't already be parsed.</P
1434 ><P
1435 > For example you could tag client requests which use the
1436  <TT
1437 CLASS="LITERAL"
1438 >POST</TT
1439 > method,
1440  then use this tag to activate another tagger that adds a tag if cookies
1441  are sent, and then use a block action based on the cookie tag. This allows
1442  the outcome of one action, to be input into a subsequent action. However if
1443  you'd reverse the position of the described taggers, and activated the
1444  method tagger based on the cookie tagger, no method tags would be created.
1445  The method tagger would look for the request line, but at the time
1446  the cookie tag is created, the request line has already been parsed.</P
1447 ><P
1448 > While this is a limitation you should be aware of, this kind of
1449  indirection is seldom needed anyway and even the example doesn't
1450  make too much sense.</P
1451 ></DIV
1452 ></DIV
1453 ><DIV
1454 CLASS="SECT2"
1455 ><H2
1456 CLASS="SECT2"
1457 ><A
1458 NAME="ACTIONS"
1459 >8.5. Actions</A
1460 ></H2
1461 ><P
1462 > All actions are disabled by default, until they are explicitly enabled
1463  somewhere in an actions file. Actions are turned on if preceded with a
1464  <SPAN
1465 CLASS="QUOTE"
1466 >"+"</SPAN
1467 >, and turned off if preceded with a <SPAN
1468 CLASS="QUOTE"
1469 >"-"</SPAN
1470 >. So a
1471  <TT
1472 CLASS="LITERAL"
1473 >+action</TT
1474 > means <SPAN
1475 CLASS="QUOTE"
1476 >"do that action"</SPAN
1477 >, e.g.
1478  <TT
1479 CLASS="LITERAL"
1480 >+block</TT
1481 > means <SPAN
1482 CLASS="QUOTE"
1483 >"please block URLs that match the
1484  following patterns"</SPAN
1485 >, and <TT
1486 CLASS="LITERAL"
1487 >-block</TT
1488 > means <SPAN
1489 CLASS="QUOTE"
1490 >"don't
1491  block URLs that match the following patterns, even if <TT
1492 CLASS="LITERAL"
1493 >+block</TT
1494 >
1495  previously applied."</SPAN
1496 >&#13;</P
1497 ><P
1498
1499  Again, actions are invoked by placing them on a line, enclosed in curly braces and
1500  separated by whitespace, like in 
1501  <TT
1502 CLASS="LITERAL"
1503 >{+some-action -some-other-action{some-parameter}}</TT
1504 >,
1505  followed by a list of URL patterns, one per line, to which they apply.
1506  Together, the actions line and the following pattern lines make up a section
1507  of the actions file. </P
1508 ><P
1509
1510  Actions fall into three categories:</P
1511 ><P
1512 > <P
1513 ></P
1514 ><UL
1515 ><LI
1516 ><P
1517 >  
1518    Boolean, i.e the action can only be <SPAN
1519 CLASS="QUOTE"
1520 >"enabled"</SPAN
1521 > or
1522    <SPAN
1523 CLASS="QUOTE"
1524 >"disabled"</SPAN
1525 >. Syntax:
1526   </P
1527 ><P
1528 >   <TABLE
1529 BORDER="0"
1530 BGCOLOR="#E0E0E0"
1531 WIDTH="90%"
1532 ><TR
1533 ><TD
1534 ><PRE
1535 CLASS="SCREEN"
1536 >  +<TT
1537 CLASS="REPLACEABLE"
1538 ><I
1539 >name</I
1540 ></TT
1541 >        # enable action <TT
1542 CLASS="REPLACEABLE"
1543 ><I
1544 >name</I
1545 ></TT
1546 >
1547   -<TT
1548 CLASS="REPLACEABLE"
1549 ><I
1550 >name</I
1551 ></TT
1552 >        # disable action <TT
1553 CLASS="REPLACEABLE"
1554 ><I
1555 >name</I
1556 ></TT
1557 ></PRE
1558 ></TD
1559 ></TR
1560 ></TABLE
1561 >
1562   </P
1563 ><P
1564 >  
1565    Example: <TT
1566 CLASS="LITERAL"
1567 >+block</TT
1568 >
1569   </P
1570 ></LI
1571 ><LI
1572 ><P
1573 >  
1574    Parameterized, where some value is required in order to enable this type of action.
1575    Syntax:
1576   </P
1577 ><P
1578 >   <TABLE
1579 BORDER="0"
1580 BGCOLOR="#E0E0E0"
1581 WIDTH="90%"
1582 ><TR
1583 ><TD
1584 ><PRE
1585 CLASS="SCREEN"
1586 >  +<TT
1587 CLASS="REPLACEABLE"
1588 ><I
1589 >name</I
1590 ></TT
1591 >{<TT
1592 CLASS="REPLACEABLE"
1593 ><I
1594 >param</I
1595 ></TT
1596 >}  # enable action and set parameter to <TT
1597 CLASS="REPLACEABLE"
1598 ><I
1599 >param</I
1600 ></TT
1601 >,
1602                # overwriting parameter from previous match if necessary
1603   -<TT
1604 CLASS="REPLACEABLE"
1605 ><I
1606 >name</I
1607 ></TT
1608 >         # disable action. The parameter can be omitted</PRE
1609 ></TD
1610 ></TR
1611 ></TABLE
1612 >
1613   </P
1614 ><P
1615 >   Note that if the URL matches multiple positive forms of a parameterized action,
1616    the last match wins, i.e. the params from earlier matches are simply ignored.
1617   </P
1618 ><P
1619 >  
1620    Example: <TT
1621 CLASS="LITERAL"
1622 >+hide-user-agent{Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.4) Gecko/20070602 Firefox/2.0.0.4}</TT
1623 >
1624   </P
1625 ></LI
1626 ><LI
1627 ><P
1628 >  
1629    Multi-value. These look exactly like parameterized actions,
1630    but they behave differently: If the action applies multiple times to the
1631    same URL, but with different parameters, <SPAN
1632 CLASS="emphasis"
1633 ><I
1634 CLASS="EMPHASIS"
1635 >all</I
1636 ></SPAN
1637 > the parameters
1638    from <SPAN
1639 CLASS="emphasis"
1640 ><I
1641 CLASS="EMPHASIS"
1642 >all</I
1643 ></SPAN
1644 > matches are remembered. This is used for actions
1645    that can be executed for the same request repeatedly, like adding multiple
1646    headers, or filtering through multiple filters. Syntax:
1647   </P
1648 ><P
1649 >   <TABLE
1650 BORDER="0"
1651 BGCOLOR="#E0E0E0"
1652 WIDTH="90%"
1653 ><TR
1654 ><TD
1655 ><PRE
1656 CLASS="SCREEN"
1657 >  +<TT
1658 CLASS="REPLACEABLE"
1659 ><I
1660 >name</I
1661 ></TT
1662 >{<TT
1663 CLASS="REPLACEABLE"
1664 ><I
1665 >param</I
1666 ></TT
1667 >}   # enable action and add <TT
1668 CLASS="REPLACEABLE"
1669 ><I
1670 >param</I
1671 ></TT
1672 > to the list of parameters
1673   -<TT
1674 CLASS="REPLACEABLE"
1675 ><I
1676 >name</I
1677 ></TT
1678 >{<TT
1679 CLASS="REPLACEABLE"
1680 ><I
1681 >param</I
1682 ></TT
1683 >}   # remove the parameter <TT
1684 CLASS="REPLACEABLE"
1685 ><I
1686 >param</I
1687 ></TT
1688 > from the list of parameters
1689                 # If it was the last one left, disable the action.
1690   <TT
1691 CLASS="REPLACEABLE"
1692 ><I
1693 >-name</I
1694 ></TT
1695 >          # disable this action completely and remove all parameters from the list</PRE
1696 ></TD
1697 ></TR
1698 ></TABLE
1699 >
1700   </P
1701 ><P
1702 >  
1703    Examples: <TT
1704 CLASS="LITERAL"
1705 >+add-header{X-Fun-Header: Some text}</TT
1706 > and
1707    <TT
1708 CLASS="LITERAL"
1709 >+filter{html-annoyances}</TT
1710 >
1711   </P
1712 ></LI
1713 ></UL
1714 ></P
1715 ><P
1716 > If nothing is specified in any actions file, no <SPAN
1717 CLASS="QUOTE"
1718 >"actions"</SPAN
1719 > are
1720  taken. So in this case <SPAN
1721 CLASS="APPLICATION"
1722 >Privoxy</SPAN
1723 > would just be a
1724  normal, non-blocking, non-filtering proxy. You must specifically enable the
1725  privacy and blocking features you need (although the provided default actions
1726  files will give a good starting point).</P
1727 ><P
1728 > Later defined action sections always over-ride earlier ones of the same type.
1729  So exceptions to any rules you make, should come in the latter part of the file (or 
1730  in a file that is processed later when using multiple actions files such 
1731  as <TT
1732 CLASS="FILENAME"
1733 >user.action</TT
1734 >). For multi-valued actions, the actions
1735  are applied in the order they are specified. Actions files are processed in
1736  the order they are defined in <TT
1737 CLASS="FILENAME"
1738 >config</TT
1739 > (the default
1740  installation has three actions files). It also quite possible for any given
1741  URL to match more than one <SPAN
1742 CLASS="QUOTE"
1743 >"pattern"</SPAN
1744 > (because of wildcards and
1745  regular expressions), and thus to trigger more than one set of actions! Last
1746  match wins.</P
1747 ><P
1748 > The list of valid <SPAN
1749 CLASS="APPLICATION"
1750 >Privoxy</SPAN
1751 > actions are:</P
1752 ><DIV
1753 CLASS="SECT3"
1754 ><H4
1755 CLASS="SECT3"
1756 ><A
1757 NAME="ADD-HEADER"
1758 >8.5.1. add-header</A
1759 ></H4
1760 ><P
1761 ></P
1762 ><DIV
1763 CLASS="VARIABLELIST"
1764 ><DL
1765 ><DT
1766 >Typical use:</DT
1767 ><DD
1768 ><P
1769 >Confuse log analysis, custom applications</P
1770 ></DD
1771 ><DT
1772 >Effect:</DT
1773 ><DD
1774 ><P
1775 >    Sends a user defined HTTP header to the web server.
1776    </P
1777 ></DD
1778 ><DT
1779 >Type:</DT
1780 ><DD
1781 ><P
1782 >Multi-value.</P
1783 ></DD
1784 ><DT
1785 >Parameter:</DT
1786 ><DD
1787 ><P
1788 >    Any string value is possible. Validity of the defined HTTP headers is not checked.
1789     It is recommended that you use the <SPAN
1790 CLASS="QUOTE"
1791 >"<TT
1792 CLASS="LITERAL"
1793 >X-</TT
1794 >"</SPAN
1795 > prefix
1796     for custom headers.
1797    </P
1798 ></DD
1799 ><DT
1800 >Notes:</DT
1801 ><DD
1802 ><P
1803 >    This action may be specified multiple times, in order to define multiple 
1804     headers. This is rarely needed for the typical user. If you don't know what 
1805     <SPAN
1806 CLASS="QUOTE"
1807 >"HTTP headers"</SPAN
1808 > are, you definitely don't need to worry about this 
1809     one.
1810    </P
1811 ></DD
1812 ><DT
1813 >Example usage:</DT
1814 ><DD
1815 ><P
1816 >     <TABLE
1817 BORDER="0"
1818 BGCOLOR="#E0E0E0"
1819 WIDTH="90%"
1820 ><TR
1821 ><TD
1822 ><PRE
1823 CLASS="SCREEN"
1824 >+add-header{X-User-Tracking: sucks}</PRE
1825 ></TD
1826 ></TR
1827 ></TABLE
1828 >
1829    </P
1830 ></DD
1831 ></DL
1832 ></DIV
1833 ></DIV
1834 ><DIV
1835 CLASS="SECT3"
1836 ><H4
1837 CLASS="SECT3"
1838 ><A
1839 NAME="BLOCK"
1840 >8.5.2. block</A
1841 ></H4
1842 ><P
1843 ></P
1844 ><DIV
1845 CLASS="VARIABLELIST"
1846 ><DL
1847 ><DT
1848 >Typical use:</DT
1849 ><DD
1850 ><P
1851 >Block ads or other unwanted content</P
1852 ></DD
1853 ><DT
1854 >Effect:</DT
1855 ><DD
1856 ><P
1857 >    Requests for URLs to which this action applies are blocked, i.e. the
1858     requests are trapped by <SPAN
1859 CLASS="APPLICATION"
1860 >Privoxy</SPAN
1861 > and the requested URL is never retrieved,
1862     but is answered locally with a substitute page or image, as determined by
1863     the <TT
1864 CLASS="LITERAL"
1865 ><A
1866 HREF="actions-file.html#HANDLE-AS-IMAGE"
1867 >handle-as-image</A
1868 ></TT
1869 >,
1870     <TT
1871 CLASS="LITERAL"
1872 ><A
1873 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1874 >set-image-blocker</A
1875 ></TT
1876 >, and 
1877     <TT
1878 CLASS="LITERAL"
1879 ><A
1880 HREF="actions-file.html#HANDLE-AS-EMPTY-DOCUMENT"
1881 >handle-as-empty-document</A
1882 ></TT
1883 > actions.
1884     
1885    </P
1886 ></DD
1887 ><DT
1888 >Type:</DT
1889 ><DD
1890 ><P
1891 >Boolean.</P
1892 ></DD
1893 ><DT
1894 >Parameter:</DT
1895 ><DD
1896 ><P
1897 >N/A</P
1898 ></DD
1899 ><DT
1900 >Notes:</DT
1901 ><DD
1902 ><P
1903 >    <SPAN
1904 CLASS="APPLICATION"
1905 >Privoxy</SPAN
1906 > sends a special <SPAN
1907 CLASS="QUOTE"
1908 >"BLOCKED"</SPAN
1909 > page
1910     for requests to blocked pages. This page contains links to find out why the request
1911     was blocked, and a click-through to the blocked content (the latter only if compiled with the
1912     force feature enabled). The <SPAN
1913 CLASS="QUOTE"
1914 >"BLOCKED"</SPAN
1915 > page adapts to the available
1916     screen space -- it displays full-blown if space allows, or miniaturized and text-only
1917     if loaded into a small frame or window. If you are using <SPAN
1918 CLASS="APPLICATION"
1919 >Privoxy</SPAN
1920 >
1921     right now, you can take a look at the 
1922     <A
1923 HREF="http://ads.bannerserver.example.com/nasty-ads/sponsor.html"
1924 TARGET="_top"
1925 ><SPAN
1926 CLASS="QUOTE"
1927 >"BLOCKED"</SPAN
1928 >
1929     page</A
1930 >.
1931    </P
1932 ><P
1933
1934     A very important exception occurs if <SPAN
1935 CLASS="emphasis"
1936 ><I
1937 CLASS="EMPHASIS"
1938 >both</I
1939 ></SPAN
1940
1941     <TT
1942 CLASS="LITERAL"
1943 >block</TT
1944 > and <TT
1945 CLASS="LITERAL"
1946 ><A
1947 HREF="actions-file.html#HANDLE-AS-IMAGE"
1948 >handle-as-image</A
1949 ></TT
1950 >,
1951     apply to the same request: it will then be replaced by an image. If 
1952     <TT
1953 CLASS="LITERAL"
1954 ><A
1955 HREF="actions-file.html#SET-IMAGE-BLOCKER"
1956 >set-image-blocker</A
1957 ></TT
1958 >
1959     (see below) also applies, the type of image will be determined by its parameter,
1960     if not, the standard checkerboard pattern is sent.
1961    </P
1962 ><P
1963 >    It is important to understand this process, in order 
1964     to understand how <SPAN
1965 CLASS="APPLICATION"
1966 >Privoxy</SPAN
1967 > deals with 
1968     ads and other unwanted content. Blocking is a core feature, and one 
1969     upon which various other features depend.
1970    </P
1971 ><P
1972 >    The <TT
1973 CLASS="LITERAL"
1974 ><A
1975 HREF="actions-file.html#FILTER"
1976 >filter</A
1977 ></TT
1978 >
1979     action can perform a very similar task, by <SPAN
1980 CLASS="QUOTE"
1981 >"blocking"</SPAN
1982 >
1983     banner images and other content through rewriting the relevant URLs in the
1984     document's HTML source, so they don't get requested in the first place.
1985     Note that this is a totally different technique, and it's easy to confuse the two.
1986    </P
1987 ></DD
1988 ><DT
1989 >Example usage (section):</DT
1990 ><DD
1991 ><P
1992 >     <TABLE
1993 BORDER="0"
1994 BGCOLOR="#E0E0E0"
1995 WIDTH="90%"
1996 ><TR
1997 ><TD
1998 ><PRE
1999 CLASS="SCREEN"
2000 >{+block}      
2001 # Block and replace with "blocked" page
2002  .nasty-stuff.example.com
2003
2004 {+block +handle-as-image} 
2005 # Block and replace with image
2006  .ad.doubleclick.net
2007  .ads.r.us/banners/
2008
2009 {+block +handle-as-empty-document} 
2010 # Block and then ignore
2011  adserver.exampleclick.net/.*\.js$</PRE
2012 ></TD
2013 ></TR
2014 ></TABLE
2015 >
2016     </P
2017 ></DD
2018 ></DL
2019 ></DIV
2020 ></DIV
2021 ><DIV
2022 CLASS="SECT3"
2023 ><H4
2024 CLASS="SECT3"
2025 ><A
2026 NAME="CLIENT-HEADER-FILTER"
2027 >8.5.3. client-header-filter</A
2028 ></H4
2029 ><P
2030 ></P
2031 ><DIV
2032 CLASS="VARIABLELIST"
2033 ><DL
2034 ><DT
2035 >Typical use:</DT
2036 ><DD
2037 ><P
2038 >   Rewrite or remove single client headers.
2039    </P
2040 ></DD
2041 ><DT
2042 >Effect:</DT
2043 ><DD
2044 ><P
2045 >    All client headers to which this action applies are filtered on-the-fly through
2046     the specified regular expression based substitutions.
2047    </P
2048 ></DD
2049 ><DT
2050 >Type:</DT
2051 ><DD
2052 ><P
2053 >Parameterized.</P
2054 ></DD
2055 ><DT
2056 >Parameter:</DT
2057 ><DD
2058 ><P
2059 >    The name of a client-header filter, as defined in one of the
2060     <A
2061 HREF="filter-file.html"
2062 >filter files</A
2063 >.
2064    </P
2065 ></DD
2066 ><DT
2067 >Notes:</DT
2068 ><DD
2069 ><P
2070 >    Client-header filters are applied to each header on its own, not to
2071     all at once. This makes it easier to diagnose problems, but on the downside
2072     you can't write filters that only change header x if header y's value is z.
2073     You can do that by using tags though.
2074    </P
2075 ><P
2076 >    Client-header filters are executed after the other header actions have finished
2077     and use their output as input.
2078    </P
2079 ><P
2080 >    If the request URL gets changed, <SPAN
2081 CLASS="APPLICATION"
2082 >Privoxy</SPAN
2083 > will detect that and use the new
2084     one. This can be used to rewrite the request destination behind the client's
2085     back, for example to specify a Tor exit relay for certain requests.
2086    </P
2087 ><P
2088 >    Please refer to the <A
2089 HREF="filter-file.html"
2090 >filter file chapter</A
2091 >
2092     to learn which client-header filters are available by default, and how to
2093     create your own.
2094    </P
2095 ></DD
2096 ><DT
2097 >Example usage (section):</DT
2098 ><DD
2099 ><P
2100 >     <TABLE
2101 BORDER="0"
2102 BGCOLOR="#E0E0E0"
2103 WIDTH="90%"
2104 ><TR
2105 ><TD
2106 ><PRE
2107 CLASS="SCREEN"
2108 >{+client-header-filter{hide-tor-exit-notation}}
2109 .exit/
2110     </PRE
2111 ></TD
2112 ></TR
2113 ></TABLE
2114 >
2115     </P
2116 ></DD
2117 ></DL
2118 ></DIV
2119 ></DIV
2120 ><DIV
2121 CLASS="SECT3"
2122 ><H4
2123 CLASS="SECT3"
2124 ><A
2125 NAME="CLIENT-HEADER-TAGGER"
2126 >8.5.4. client-header-tagger</A
2127 ></H4
2128 ><P
2129 ></P
2130 ><DIV
2131 CLASS="VARIABLELIST"
2132 ><DL
2133 ><DT
2134 >Typical use:</DT
2135 ><DD
2136 ><P
2137 >   Block requests based on their headers.
2138    </P
2139 ></DD
2140 ><DT
2141 >Effect:</DT
2142 ><DD
2143 ><P
2144 >    Client headers to which this action applies are filtered on-the-fly through
2145     the specified regular expression based substitutions, the result is used as
2146     tag. 
2147    </P
2148 ></DD
2149 ><DT
2150 >Type:</DT
2151 ><DD
2152 ><P
2153 >Parameterized.</P
2154 ></DD
2155 ><DT
2156 >Parameter:</DT
2157 ><DD
2158 ><P
2159 >    The name of a client-header tagger, as defined in one of the
2160     <A
2161 HREF="filter-file.html"
2162 >filter files</A
2163 >.
2164    </P
2165 ></DD
2166 ><DT
2167 >Notes:</DT
2168 ><DD
2169 ><P
2170 >    Client-header taggers are applied to each header on its own,
2171     and as the header isn't modified, each tagger <SPAN
2172 CLASS="QUOTE"
2173 >"sees"</SPAN
2174 >
2175     the original.
2176    </P
2177 ><P
2178 >    Client-header taggers are the first actions that are executed
2179     and their tags can be used to control every other action.
2180    </P
2181 ></DD
2182 ><DT
2183 >Example usage (section):</DT
2184 ><DD
2185 ><P
2186 >     <TABLE
2187 BORDER="0"
2188 BGCOLOR="#E0E0E0"
2189 WIDTH="90%"
2190 ><TR
2191 ><TD
2192 ><PRE
2193 CLASS="SCREEN"
2194 ># Tag every request with the User-Agent header
2195 {+client-header-tagger{user-agent}}
2196 /
2197     </PRE
2198 ></TD
2199 ></TR
2200 ></TABLE
2201 >
2202     </P
2203 ></DD
2204 ></DL
2205 ></DIV
2206 ></DIV
2207 ><DIV
2208 CLASS="SECT3"
2209 ><H4
2210 CLASS="SECT3"
2211 ><A
2212 NAME="CONTENT-TYPE-OVERWRITE"
2213 >8.5.5. content-type-overwrite</A
2214 ></H4
2215 ><P
2216 ></P
2217 ><DIV
2218 CLASS="VARIABLELIST"
2219 ><DL
2220 ><DT
2221 >Typical use:</DT
2222 ><DD
2223 ><P
2224 >Stop useless download menus from popping up, or change the browser's rendering mode</P
2225 ></DD
2226 ><DT
2227 >Effect:</DT
2228 ><DD
2229 ><P
2230 >    Replaces the <SPAN
2231 CLASS="QUOTE"
2232 >"Content-Type:"</SPAN
2233 > HTTP server header.
2234    </P
2235 ></DD
2236 ><DT
2237 >Type:</DT
2238 ><DD
2239 ><P
2240 >Parameterized.</P
2241 ></DD
2242 ><DT
2243 >Parameter:</DT
2244 ><DD
2245 ><P
2246 >    Any string. 
2247    </P
2248 ></DD
2249 ><DT
2250 >Notes:</DT
2251 ><DD
2252 ><P
2253 >    The <SPAN
2254 CLASS="QUOTE"
2255 >"Content-Type:"</SPAN
2256 > HTTP server header is used by the
2257     browser to decide what to do with the document. The value of this
2258     header can cause the browser to open a download menu instead of
2259     displaying the document by itself, even if the document's format is
2260     supported by the browser. 
2261    </P
2262 ><P
2263 >    The declared content type can also affect which rendering mode
2264     the browser chooses. If XHTML is delivered as <SPAN
2265 CLASS="QUOTE"
2266 >"text/html"</SPAN
2267 >,
2268     many browsers treat it as yet another broken HTML document.
2269     If it is send as <SPAN
2270 CLASS="QUOTE"
2271 >"application/xml"</SPAN
2272 >, browsers with
2273     XHTML support will only display it, if the syntax is correct.
2274    </P
2275 ><P
2276 >    If you see a web site that proudly uses XHTML buttons, but sets
2277     <SPAN
2278 CLASS="QUOTE"
2279 >"Content-Type: text/html"</SPAN
2280 >, you can use <SPAN
2281 CLASS="APPLICATION"
2282 >Privoxy</SPAN
2283 >
2284     to overwrite it with <SPAN
2285 CLASS="QUOTE"
2286 >"application/xml"</SPAN
2287 > and validate
2288     the web master's claim inside your XHTML-supporting browser.
2289     If the syntax is incorrect, the browser will complain loudly. 
2290    </P
2291 ><P
2292 >    You can also go the opposite direction: if your browser prints
2293     error messages instead of rendering a document falsely declared
2294     as XHTML, you can overwrite the content type with
2295     <SPAN
2296 CLASS="QUOTE"
2297 >"text/html"</SPAN
2298 > and have it rendered as broken HTML document. 
2299    </P
2300 ><P
2301 >    By default <TT
2302 CLASS="LITERAL"
2303 >content-type-overwrite</TT
2304 > only replaces
2305     <SPAN
2306 CLASS="QUOTE"
2307 >"Content-Type:"</SPAN
2308 > headers that look like some kind of text.
2309     If you want to overwrite it unconditionally, you have to combine it with
2310     <TT
2311 CLASS="LITERAL"
2312 ><A
2313 HREF="actions-file.html#FORCE-TEXT-MODE"
2314 >force-text-mode</A
2315 ></TT
2316 >.
2317     This limitation exists for a reason, think twice before circumventing it.
2318    </P
2319 ><P
2320 >    Most of the time it's easier to replace this action with a custom
2321     <TT
2322 CLASS="LITERAL"
2323 ><A
2324 HREF="actions-file.html#SERVER-HEADER-FILTER"
2325 >server-header filter</A
2326 ></TT
2327 >.
2328     It allows you to activate it for every document of a certain site and it will still
2329     only replace the content types you aimed at.
2330    </P
2331 ><P
2332 >    Of course you can apply <TT
2333 CLASS="LITERAL"
2334 >content-type-overwrite</TT
2335 >
2336     to a whole site and then make URL based exceptions, but it's a lot
2337     more work to get the same precision. 
2338    </P
2339 ></DD
2340 ><DT
2341 >Example usage (sections):</DT
2342 ><DD
2343 ><P
2344 >     <TABLE
2345 BORDER="0"
2346 BGCOLOR="#E0E0E0"
2347 WIDTH="90%"
2348 ><TR
2349 ><TD
2350 ><PRE
2351 CLASS="SCREEN"
2352 ># Check if www.example.net/ really uses valid XHTML
2353 { +content-type-overwrite{application/xml} }
2354 www.example.net/
2355
2356 # but leave the content type unmodified if the URL looks like a style sheet
2357 {-content-type-overwrite}
2358 www.example.net/.*\.css$
2359 www.example.net/.*style</PRE
2360 ></TD
2361 ></TR
2362 ></TABLE
2363 >
2364    </P
2365 ></DD
2366 ></DL
2367 ></DIV
2368 ></DIV
2369 ><DIV
2370 CLASS="SECT3"
2371 ><H4
2372 CLASS="SECT3"
2373 ><A
2374 NAME="CRUNCH-CLIENT-HEADER"
2375 >8.5.6. crunch-client-header</A
2376 ></H4
2377 ><P
2378 ></P
2379 ><DIV
2380 CLASS="VARIABLELIST"
2381 ><DL
2382 ><DT
2383 >Typical use:</DT
2384 ><DD
2385 ><P
2386 >Remove a client header <SPAN
2387 CLASS="APPLICATION"
2388 >Privoxy</SPAN
2389 > has no dedicated action for.</P
2390 ></DD
2391 ><DT
2392 >Effect:</DT
2393 ><DD
2394 ><P
2395 >    Deletes every header sent by the client that contains the string the user supplied as parameter.
2396    </P
2397 ></DD
2398 ><DT
2399 >Type:</DT
2400 ><DD
2401 ><P
2402 >Parameterized.</P
2403 ></DD
2404 ><DT
2405 >Parameter:</DT
2406 ><DD
2407 ><P
2408 >    Any string.
2409    </P
2410 ></DD
2411 ><DT
2412 >Notes:</DT
2413 ><DD
2414 ><P
2415 >    This action allows you to block client headers for which no dedicated
2416     <SPAN
2417 CLASS="APPLICATION"
2418 >Privoxy</SPAN
2419 > action exists.
2420     <SPAN
2421 CLASS="APPLICATION"
2422 >Privoxy</SPAN
2423 > will remove every client header that
2424     contains the string you supplied as parameter.
2425    </P
2426 ><P
2427 >    Regular expressions are <SPAN
2428 CLASS="emphasis"
2429 ><I
2430 CLASS="EMPHASIS"
2431 >not supported</I
2432 ></SPAN
2433 > and you can't
2434     use this action to block different headers in the same request, unless
2435     they contain the same string.
2436    </P
2437 ><P
2438 >    <TT
2439 CLASS="LITERAL"
2440 >crunch-client-header</TT
2441 > is only meant for quick tests.
2442     If you have to block several different headers, or only want to modify
2443     parts of them, you should use a
2444     <TT
2445 CLASS="LITERAL"
2446 ><A
2447 HREF="actions-file.html#CLIENT-HEADER-FILTER"
2448 >client-header filter</A
2449 ></TT
2450 >.
2451    </P
2452 ><DIV
2453 CLASS="WARNING"
2454 ><P
2455 ></P
2456 ><TABLE
2457 CLASS="WARNING"
2458 BORDER="1"
2459 WIDTH="90%"
2460 ><TR
2461 ><TD
2462 ALIGN="CENTER"
2463 ><B
2464 >Warning</B
2465 ></TD
2466 ></TR
2467 ><TR
2468 ><TD
2469 ALIGN="LEFT"
2470 ><P
2471 >      Don't block any header without understanding the consequences.
2472      </P
2473 ></TD
2474 ></TR
2475 ></TABLE
2476 ></DIV
2477 ></DD
2478 ><DT
2479 >Example usage (section):</DT
2480 ><DD
2481 ><P
2482 >     <TABLE
2483 BORDER="0"
2484 BGCOLOR="#E0E0E0"
2485 WIDTH="90%"
2486 ><TR
2487 ><TD
2488 ><PRE
2489 CLASS="SCREEN"
2490 ># Block the non-existent "Privacy-Violation:" client header 
2491 { +crunch-client-header{Privacy-Violation:} }
2492 /
2493     </PRE
2494 ></TD
2495 ></TR
2496 ></TABLE
2497 >
2498    </P
2499 ></DD
2500 ></DL
2501 ></DIV
2502 ></DIV
2503 ><DIV
2504 CLASS="SECT3"
2505 ><H4
2506 CLASS="SECT3"
2507 ><A
2508 NAME="CRUNCH-IF-NONE-MATCH"
2509 >8.5.7. crunch-if-none-match</A
2510 ></H4
2511 ><P
2512 ></P
2513 ><DIV
2514 CLASS="VARIABLELIST"
2515 ><DL
2516 ><DT
2517 >Typical use:</DT
2518 ><DD
2519 ><P
2520 >Prevent yet another way to track the user's steps between sessions.</P
2521 ></DD
2522 ><DT
2523 >Effect:</DT
2524 ><DD
2525 ><P
2526 >    Deletes the <SPAN
2527 CLASS="QUOTE"
2528 >"If-None-Match:"</SPAN
2529 > HTTP client header.
2530    </P
2531 ></DD
2532 ><DT
2533 >Type:</DT
2534 ><DD
2535 ><P
2536 >Boolean.</P
2537 ></DD
2538 ><DT
2539 >Parameter:</DT
2540 ><DD
2541 ><P
2542 >    N/A
2543    </P
2544 ></DD
2545 ><DT
2546 >Notes:</DT
2547 ><DD
2548 ><P
2549 >    Removing the <SPAN
2550 CLASS="QUOTE"
2551 >"If-None-Match:"</SPAN
2552 > HTTP client header
2553     is useful for filter testing, where you want to force a real
2554     reload instead of getting status code <SPAN
2555 CLASS="QUOTE"
2556 >"304"</SPAN
2557 > which
2558     would cause the browser to use a cached copy of the page.
2559    </P
2560 ><P
2561 >    It is also useful to make sure the header isn't used as a cookie
2562     replacement (unlikely but possible).
2563    </P
2564 ><P
2565 >    Blocking the <SPAN
2566 CLASS="QUOTE"
2567 >"If-None-Match:"</SPAN
2568 > header shouldn't cause any
2569     caching problems, as long as the <SPAN
2570 CLASS="QUOTE"
2571 >"If-Modified-Since:"</SPAN
2572 > header
2573     isn't blocked or missing as well.
2574    </P
2575 ><P
2576 >    It is recommended to use this action together with
2577     <TT
2578 CLASS="LITERAL"
2579 ><A
2580 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
2581 >hide-if-modified-since</A
2582 ></TT
2583 >
2584     and
2585     <TT
2586 CLASS="LITERAL"
2587 ><A
2588 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
2589 >overwrite-last-modified</A
2590 ></TT
2591 >.
2592    </P
2593 ></DD
2594 ><DT
2595 >Example usage (section):</DT
2596 ><DD
2597 ><P
2598 >     <TABLE
2599 BORDER="0"
2600 BGCOLOR="#E0E0E0"
2601 WIDTH="90%"
2602 ><TR
2603 ><TD
2604 ><PRE
2605 CLASS="SCREEN"
2606 ># Let the browser revalidate cached documents but don't
2607 # allow the server to use the revalidation headers for user tracking.
2608 {+hide-if-modified-since{-60} \
2609  +overwrite-last-modified{randomize} \
2610  +crunch-if-none-match}
2611 /   </PRE
2612 ></TD
2613 ></TR
2614 ></TABLE
2615 >
2616    </P
2617 ></DD
2618 ></DL
2619 ></DIV
2620 ></DIV
2621 ><DIV
2622 CLASS="SECT3"
2623 ><H4
2624 CLASS="SECT3"
2625 ><A
2626 NAME="CRUNCH-INCOMING-COOKIES"
2627 >8.5.8. crunch-incoming-cookies</A
2628 ></H4
2629 ><P
2630 ></P
2631 ><DIV
2632 CLASS="VARIABLELIST"
2633 ><DL
2634 ><DT
2635 >Typical use:</DT
2636 ><DD
2637 ><P
2638 >    Prevent the web server from setting HTTP cookies on your system
2639    </P
2640 ></DD
2641 ><DT
2642 >Effect:</DT
2643 ><DD
2644 ><P
2645 >    Deletes any <SPAN
2646 CLASS="QUOTE"
2647 >"Set-Cookie:"</SPAN
2648 > HTTP headers from server replies.
2649    </P
2650 ></DD
2651 ><DT
2652 >Type:</DT
2653 ><DD
2654 ><P
2655 >Boolean.</P
2656 ></DD
2657 ><DT
2658 >Parameter:</DT
2659 ><DD
2660 ><P
2661 >    N/A
2662    </P
2663 ></DD
2664 ><DT
2665 >Notes:</DT
2666 ><DD
2667 ><P
2668 >    This action is only concerned with <SPAN
2669 CLASS="emphasis"
2670 ><I
2671 CLASS="EMPHASIS"
2672 >incoming</I
2673 ></SPAN
2674 > HTTP cookies. For
2675     <SPAN
2676 CLASS="emphasis"
2677 ><I
2678 CLASS="EMPHASIS"
2679 >outgoing</I
2680 ></SPAN
2681 > HTTP cookies, use
2682     <TT
2683 CLASS="LITERAL"
2684 ><A
2685 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
2686 >crunch-outgoing-cookies</A
2687 ></TT
2688 >.
2689     Use <SPAN
2690 CLASS="emphasis"
2691 ><I
2692 CLASS="EMPHASIS"
2693 >both</I
2694 ></SPAN
2695 > to disable HTTP cookies completely.
2696    </P
2697 ><P
2698 >    It makes <SPAN
2699 CLASS="emphasis"
2700 ><I
2701 CLASS="EMPHASIS"
2702 >no sense at all</I
2703 ></SPAN
2704 > to use this action in conjunction
2705     with the <TT
2706 CLASS="LITERAL"
2707 ><A
2708 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2709 >session-cookies-only</A
2710 ></TT
2711 > action,
2712     since it would prevent the session cookies from being set. See also 
2713     <TT
2714 CLASS="LITERAL"
2715 ><A
2716 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
2717 >filter-content-cookies</A
2718 ></TT
2719 >.
2720    </P
2721 ></DD
2722 ><DT
2723 >Example usage:</DT
2724 ><DD
2725 ><P
2726 >    <TABLE
2727 BORDER="0"
2728 BGCOLOR="#E0E0E0"
2729 WIDTH="90%"
2730 ><TR
2731 ><TD
2732 ><PRE
2733 CLASS="SCREEN"
2734 >+crunch-incoming-cookies</PRE
2735 ></TD
2736 ></TR
2737 ></TABLE
2738 >
2739    </P
2740 ></DD
2741 ></DL
2742 ></DIV
2743 ></DIV
2744 ><DIV
2745 CLASS="SECT3"
2746 ><H4
2747 CLASS="SECT3"
2748 ><A
2749 NAME="CRUNCH-SERVER-HEADER"
2750 >8.5.9. crunch-server-header</A
2751 ></H4
2752 ><P
2753 ></P
2754 ><DIV
2755 CLASS="VARIABLELIST"
2756 ><DL
2757 ><DT
2758 >Typical use:</DT
2759 ><DD
2760 ><P
2761 >Remove a server header <SPAN
2762 CLASS="APPLICATION"
2763 >Privoxy</SPAN
2764 > has no dedicated action for.</P
2765 ></DD
2766 ><DT
2767 >Effect:</DT
2768 ><DD
2769 ><P
2770 >    Deletes every header sent by the server that contains the string the user supplied as parameter.
2771    </P
2772 ></DD
2773 ><DT
2774 >Type:</DT
2775 ><DD
2776 ><P
2777 >Parameterized.</P
2778 ></DD
2779 ><DT
2780 >Parameter:</DT
2781 ><DD
2782 ><P
2783 >    Any string.
2784    </P
2785 ></DD
2786 ><DT
2787 >Notes:</DT
2788 ><DD
2789 ><P
2790 >    This action allows you to block server headers for which no dedicated
2791     <SPAN
2792 CLASS="APPLICATION"
2793 >Privoxy</SPAN
2794 > action exists. <SPAN
2795 CLASS="APPLICATION"
2796 >Privoxy</SPAN
2797 >
2798     will remove every server header that contains the string you supplied as parameter.
2799    </P
2800 ><P
2801 >    Regular expressions are <SPAN
2802 CLASS="emphasis"
2803 ><I
2804 CLASS="EMPHASIS"
2805 >not supported</I
2806 ></SPAN
2807 > and you can't
2808     use this action to block different headers in the same request, unless
2809     they contain the same string.
2810    </P
2811 ><P
2812 >    <TT
2813 CLASS="LITERAL"
2814 >crunch-server-header</TT
2815 > is only meant for quick tests.
2816     If you have to block several different headers, or only want to modify
2817     parts of them, you should use a custom
2818     <TT
2819 CLASS="LITERAL"
2820 ><A
2821 HREF="actions-file.html#SERVER-HEADER-FILTER"
2822 >server-header filter</A
2823 ></TT
2824 >.
2825    </P
2826 ><DIV
2827 CLASS="WARNING"
2828 ><P
2829 ></P
2830 ><TABLE
2831 CLASS="WARNING"
2832 BORDER="1"
2833 WIDTH="90%"
2834 ><TR
2835 ><TD
2836 ALIGN="CENTER"
2837 ><B
2838 >Warning</B
2839 ></TD
2840 ></TR
2841 ><TR
2842 ><TD
2843 ALIGN="LEFT"
2844 ><P
2845 >     Don't block any header without understanding the consequences.
2846      </P
2847 ></TD
2848 ></TR
2849 ></TABLE
2850 ></DIV
2851 ></DD
2852 ><DT
2853 >Example usage (section):</DT
2854 ><DD
2855 ><P
2856 >     <TABLE
2857 BORDER="0"
2858 BGCOLOR="#E0E0E0"
2859 WIDTH="90%"
2860 ><TR
2861 ><TD
2862 ><PRE
2863 CLASS="SCREEN"
2864 ># Crunch server headers that try to prevent caching
2865 { +crunch-server-header{no-cache} }
2866 /   </PRE
2867 ></TD
2868 ></TR
2869 ></TABLE
2870 >
2871    </P
2872 ></DD
2873 ></DL
2874 ></DIV
2875 ></DIV
2876 ><DIV
2877 CLASS="SECT3"
2878 ><H4
2879 CLASS="SECT3"
2880 ><A
2881 NAME="CRUNCH-OUTGOING-COOKIES"
2882 >8.5.10. crunch-outgoing-cookies</A
2883 ></H4
2884 ><P
2885 ></P
2886 ><DIV
2887 CLASS="VARIABLELIST"
2888 ><DL
2889 ><DT
2890 >Typical use:</DT
2891 ><DD
2892 ><P
2893 >    Prevent the web server from reading any HTTP cookies from your system
2894    </P
2895 ></DD
2896 ><DT
2897 >Effect:</DT
2898 ><DD
2899 ><P
2900 >    Deletes any <SPAN
2901 CLASS="QUOTE"
2902 >"Cookie:"</SPAN
2903 > HTTP headers from client requests.
2904    </P
2905 ></DD
2906 ><DT
2907 >Type:</DT
2908 ><DD
2909 ><P
2910 >Boolean.</P
2911 ></DD
2912 ><DT
2913 >Parameter:</DT
2914 ><DD
2915 ><P
2916 >    N/A
2917    </P
2918 ></DD
2919 ><DT
2920 >Notes:</DT
2921 ><DD
2922 ><P
2923 >    This action is only concerned with <SPAN
2924 CLASS="emphasis"
2925 ><I
2926 CLASS="EMPHASIS"
2927 >outgoing</I
2928 ></SPAN
2929 > HTTP cookies. For
2930     <SPAN
2931 CLASS="emphasis"
2932 ><I
2933 CLASS="EMPHASIS"
2934 >incoming</I
2935 ></SPAN
2936 > HTTP cookies, use
2937     <TT
2938 CLASS="LITERAL"
2939 ><A
2940 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
2941 >crunch-incoming-cookies</A
2942 ></TT
2943 >.
2944     Use <SPAN
2945 CLASS="emphasis"
2946 ><I
2947 CLASS="EMPHASIS"
2948 >both</I
2949 ></SPAN
2950 > to disable HTTP cookies completely.
2951    </P
2952 ><P
2953 >    It makes <SPAN
2954 CLASS="emphasis"
2955 ><I
2956 CLASS="EMPHASIS"
2957 >no sense at all</I
2958 ></SPAN
2959 > to use this action in conjunction
2960     with the <TT
2961 CLASS="LITERAL"
2962 ><A
2963 HREF="actions-file.html#SESSION-COOKIES-ONLY"
2964 >session-cookies-only</A
2965 ></TT
2966 > action,
2967     since it would prevent the session cookies from being read.
2968    </P
2969 ></DD
2970 ><DT
2971 >Example usage:</DT
2972 ><DD
2973 ><P
2974 >    <TABLE
2975 BORDER="0"
2976 BGCOLOR="#E0E0E0"
2977 WIDTH="90%"
2978 ><TR
2979 ><TD
2980 ><PRE
2981 CLASS="SCREEN"
2982 >+crunch-outgoing-cookies</PRE
2983 ></TD
2984 ></TR
2985 ></TABLE
2986 >
2987    </P
2988 ></DD
2989 ></DL
2990 ></DIV
2991 ></DIV
2992 ><DIV
2993 CLASS="SECT3"
2994 ><H4
2995 CLASS="SECT3"
2996 ><A
2997 NAME="DEANIMATE-GIFS"
2998 >8.5.11. deanimate-gifs</A
2999 ></H4
3000 ><P
3001 ></P
3002 ><DIV
3003 CLASS="VARIABLELIST"
3004 ><DL
3005 ><DT
3006 >Typical use:</DT
3007 ><DD
3008 ><P
3009 >Stop those annoying, distracting animated GIF images.</P
3010 ></DD
3011 ><DT
3012 >Effect:</DT
3013 ><DD
3014 ><P
3015 >    De-animate GIF animations, i.e. reduce them to their first or last image.
3016    </P
3017 ></DD
3018 ><DT
3019 >Type:</DT
3020 ><DD
3021 ><P
3022 >Parameterized.</P
3023 ></DD
3024 ><DT
3025 >Parameter:</DT
3026 ><DD
3027 ><P
3028 >    <SPAN
3029 CLASS="QUOTE"
3030 >"last"</SPAN
3031 > or <SPAN
3032 CLASS="QUOTE"
3033 >"first"</SPAN
3034 >
3035    </P
3036 ></DD
3037 ><DT
3038 >Notes:</DT
3039 ><DD
3040 ><P
3041 >    This will also shrink the images considerably (in bytes, not pixels!). If
3042     the option <SPAN
3043 CLASS="QUOTE"
3044 >"first"</SPAN
3045 > is given, the first frame of the animation
3046     is used as the replacement. If <SPAN
3047 CLASS="QUOTE"
3048 >"last"</SPAN
3049 > is given, the last
3050     frame of the animation is used instead, which probably makes more sense for
3051     most banner animations, but also has the risk of not showing the entire
3052     last frame (if it is only a delta to an earlier frame).
3053    </P
3054 ><P
3055 >    You can safely use this action with patterns that will also match non-GIF
3056     objects, because no attempt will be made at anything that doesn't look like
3057     a GIF.
3058    </P
3059 ></DD
3060 ><DT
3061 >Example usage:</DT
3062 ><DD
3063 ><P
3064 >      <TABLE
3065 BORDER="0"
3066 BGCOLOR="#E0E0E0"
3067 WIDTH="90%"
3068 ><TR
3069 ><TD
3070 ><PRE
3071 CLASS="SCREEN"
3072 >+deanimate-gifs{last}</PRE
3073 ></TD
3074 ></TR
3075 ></TABLE
3076 >
3077     </P
3078 ></DD
3079 ></DL
3080 ></DIV
3081 ></DIV
3082 ><DIV
3083 CLASS="SECT3"
3084 ><H4
3085 CLASS="SECT3"
3086 ><A
3087 NAME="DOWNGRADE-HTTP-VERSION"
3088 >8.5.12. downgrade-http-version</A
3089 ></H4
3090 ><P
3091 ></P
3092 ><DIV
3093 CLASS="VARIABLELIST"
3094 ><DL
3095 ><DT
3096 >Typical use:</DT
3097 ><DD
3098 ><P
3099 >Work around (very rare) problems with HTTP/1.1</P
3100 ></DD
3101 ><DT
3102 >Effect:</DT
3103 ><DD
3104 ><P
3105 >    Downgrades HTTP/1.1 client requests and server replies to HTTP/1.0.
3106    </P
3107 ></DD
3108 ><DT
3109 >Type:</DT
3110 ><DD
3111 ><P
3112 >Boolean.</P
3113 ></DD
3114 ><DT
3115 >Parameter:</DT
3116 ><DD
3117 ><P
3118 >    N/A
3119    </P
3120 ></DD
3121 ><DT
3122 >Notes:</DT
3123 ><DD
3124 ><P
3125 >    This is a left-over from the time when <SPAN
3126 CLASS="APPLICATION"
3127 >Privoxy</SPAN
3128 >
3129     didn't support important HTTP/1.1 features well. It is left here for the
3130     unlikely case that you experience HTTP/1.1 related problems with some server
3131     out there. Not all HTTP/1.1 features and requirements are supported yet,
3132     so there is a chance you might need this action.
3133    </P
3134 ></DD
3135 ><DT
3136 >Example usage (section):</DT
3137 ><DD
3138 ><P
3139 >     <TABLE
3140 BORDER="0"
3141 BGCOLOR="#E0E0E0"
3142 WIDTH="90%"
3143 ><TR
3144 ><TD
3145 ><PRE
3146 CLASS="SCREEN"
3147 >{+downgrade-http-version}
3148 problem-host.example.com</PRE
3149 ></TD
3150 ></TR
3151 ></TABLE
3152 >
3153     </P
3154 ></DD
3155 ></DL
3156 ></DIV
3157 ></DIV
3158 ><DIV
3159 CLASS="SECT3"
3160 ><H4
3161 CLASS="SECT3"
3162 ><A
3163 NAME="FAST-REDIRECTS"
3164 >8.5.13. fast-redirects</A
3165 ></H4
3166 ><P
3167 ></P
3168 ><DIV
3169 CLASS="VARIABLELIST"
3170 ><DL
3171 ><DT
3172 >Typical use:</DT
3173 ><DD
3174 ><P
3175 >Fool some click-tracking scripts and speed up indirect links.</P
3176 ></DD
3177 ><DT
3178 >Effect:</DT
3179 ><DD
3180 ><P
3181 >    Detects redirection URLs and redirects the browser without contacting
3182     the redirection server first.
3183    </P
3184 ></DD
3185 ><DT
3186 >Type:</DT
3187 ><DD
3188 ><P
3189 >Parameterized.</P
3190 ></DD
3191 ><DT
3192 >Parameter:</DT
3193 ><DD
3194 ><P
3195 ></P
3196 ><UL
3197 ><LI
3198 ><P
3199 >      <SPAN
3200 CLASS="QUOTE"
3201 >"simple-check"</SPAN
3202 > to just search for the string <SPAN
3203 CLASS="QUOTE"
3204 >"http://"</SPAN
3205 >
3206       to detect redirection URLs.
3207      </P
3208 ></LI
3209 ><LI
3210 ><P
3211 >      <SPAN
3212 CLASS="QUOTE"
3213 >"check-decoded-url"</SPAN
3214 > to decode URLs (if necessary) before searching
3215       for redirection URLs.
3216      </P
3217 ></LI
3218 ></UL
3219 ></DD
3220 ><DT
3221 >Notes:</DT
3222 ><DD
3223 ><P
3224 >  
3225     Many sites, like yahoo.com, don't just link to other sites. Instead, they
3226     will link to some script on their own servers, giving the destination as a
3227     parameter, which will then redirect you to the final target. URLs
3228     resulting from this scheme typically look like:
3229     <SPAN
3230 CLASS="QUOTE"
3231 >"http://www.example.org/click-tracker.cgi?target=http%3a//www.example.net/"</SPAN
3232 >.
3233   </P
3234 ><P
3235 >    Sometimes, there are even multiple consecutive redirects encoded in the
3236     URL. These redirections via scripts make your web browsing more traceable,
3237     since the server from which you follow such a link can see where you go
3238     to. Apart from that, valuable bandwidth and time is wasted, while your
3239     browser asks the server for one redirect after the other. Plus, it feeds
3240     the advertisers.
3241    </P
3242 ><P
3243 >    This feature is currently not very smart and is scheduled for improvement.
3244     If it is enabled by default, you will have to create some exceptions to
3245     this action. It can lead to failures in several ways: 
3246    </P
3247 ><P
3248 >    Not every URLs with other URLs as parameters is evil.
3249     Some sites offer a real service that requires this information to work.
3250     For example a validation service needs to know, which document to validate.
3251     <TT
3252 CLASS="LITERAL"
3253 >fast-redirects</TT
3254 > assumes that every URL parameter that
3255     looks like another URL is a redirection target, and will always redirect to
3256     the last one. Most of the time the assumption is correct, but if it isn't,
3257     the user gets redirected anyway.
3258    </P
3259 ><P
3260 >    Another failure occurs if the URL contains other parameters after the URL parameter.
3261     The URL:
3262     <SPAN
3263 CLASS="QUOTE"
3264 >"http://www.example.org/?redirect=http%3a//www.example.net/&#38;foo=bar"</SPAN
3265 >.
3266     contains the redirection URL <SPAN
3267 CLASS="QUOTE"
3268 >"http://www.example.net/"</SPAN
3269 >,
3270     followed by another parameter. <TT
3271 CLASS="LITERAL"
3272 >fast-redirects</TT
3273 > doesn't know that
3274     and will cause a redirect to <SPAN
3275 CLASS="QUOTE"
3276 >"http://www.example.net/&#38;foo=bar"</SPAN
3277 >.
3278     Depending on the target server configuration, the parameter will be silently ignored
3279     or lead to a <SPAN
3280 CLASS="QUOTE"
3281 >"page not found"</SPAN
3282 > error. You can prevent this problem by
3283     first using the <TT
3284 CLASS="LITERAL"
3285 ><A
3286 HREF="actions-file.html#REDIRECT"
3287 >redirect</A
3288 ></TT
3289 > action
3290     to remove the last part of the URL, but it requires a little effort.
3291    </P
3292 ><P
3293 >    To detect a redirection URL, <TT
3294 CLASS="LITERAL"
3295 >fast-redirects</TT
3296 > only
3297     looks for the string <SPAN
3298 CLASS="QUOTE"
3299 >"http://"</SPAN
3300 >, either in plain text
3301     (invalid but often used) or encoded as <SPAN
3302 CLASS="QUOTE"
3303 >"http%3a//"</SPAN
3304 >.
3305     Some sites use their own URL encoding scheme, encrypt the address
3306     of the target server or replace it with a database id. In theses cases
3307     <TT
3308 CLASS="LITERAL"
3309 >fast-redirects</TT
3310 > is fooled and the request reaches the
3311     redirection server where it probably gets logged.
3312    </P
3313 ></DD
3314 ><DT
3315 >Example usage:</DT
3316 ><DD
3317 ><P
3318 >     <TABLE
3319 BORDER="0"
3320 BGCOLOR="#E0E0E0"
3321 WIDTH="90%"
3322 ><TR
3323 ><TD
3324 ><PRE
3325 CLASS="SCREEN"
3326 > { +fast-redirects{simple-check} }
3327    one.example.com 
3328
3329  { +fast-redirects{check-decoded-url} }
3330    another.example.com/testing</PRE
3331 ></TD
3332 ></TR
3333 ></TABLE
3334 >
3335     </P
3336 ></DD
3337 ></DL
3338 ></DIV
3339 ></DIV
3340 ><DIV
3341 CLASS="SECT3"
3342 ><H4
3343 CLASS="SECT3"
3344 ><A
3345 NAME="FILTER"
3346 >8.5.14. filter</A
3347 ></H4
3348 ><P
3349 ></P
3350 ><DIV
3351 CLASS="VARIABLELIST"
3352 ><DL
3353 ><DT
3354 >Typical use:</DT
3355 ><DD
3356 ><P
3357 >Get rid of HTML and JavaScript annoyances, banner advertisements (by size), 
3358          do fun text replacements, add personalized effects, etc.</P
3359 ></DD
3360 ><DT
3361 >Effect:</DT
3362 ><DD
3363 ><P
3364 >    All instances of text-based type, most notably HTML and JavaScript, to which
3365     this action applies, can be filtered on-the-fly through the specified regular
3366     expression based substitutions. (Note: as of version 3.0.3 plain text documents
3367     are exempted from filtering, because web servers often use the
3368    <TT
3369 CLASS="LITERAL"
3370 >text/plain</TT
3371 > MIME type for all files whose type they don't know.)
3372    </P
3373 ></DD
3374 ><DT
3375 >Type:</DT
3376 ><DD
3377 ><P
3378 >Parameterized.</P
3379 ></DD
3380 ><DT
3381 >Parameter:</DT
3382 ><DD
3383 ><P
3384 >    The name of a content filter, as defined in the <A
3385 HREF="filter-file.html"
3386 >filter file</A
3387 >.
3388     Filters can be defined in one or more  files as defined by the 
3389     <TT
3390 CLASS="LITERAL"
3391 ><A
3392 HREF="config.html#FILTERFILE"
3393 >filterfile</A
3394 ></TT
3395 >
3396     option in the <A
3397 HREF="config.html"
3398 >config file</A
3399 >. 
3400     <TT
3401 CLASS="FILENAME"
3402 >default.filter</TT
3403 > is the collection of filters 
3404     supplied by the developers. Locally defined filters should go 
3405     in their own file, such as <TT
3406 CLASS="FILENAME"
3407 >user.filter</TT
3408 >.
3409    </P
3410 ><P
3411 >     When used in its negative form,
3412      and without parameters, <SPAN
3413 CLASS="emphasis"
3414 ><I
3415 CLASS="EMPHASIS"
3416 >all</I
3417 ></SPAN
3418 > filtering is completely disabled.
3419   </P
3420 ></DD
3421 ><DT
3422 >Notes:</DT
3423 ><DD
3424 ><P
3425 >    For your convenience, there are a number of pre-defined filters available 
3426     in the distribution filter file that you can use. See the examples below for
3427     a list.
3428    </P
3429 ><P
3430 >    Filtering requires buffering the page content, which may appear to
3431     slow down page rendering since nothing is displayed until all content has
3432     passed the filters. (It does not really take longer, but seems that way
3433     since the page is not incrementally displayed.) This effect will be more
3434     noticeable on slower connections.
3435    </P
3436 ><P
3437 >   <SPAN
3438 CLASS="QUOTE"
3439 >"Rolling your own"</SPAN
3440 >
3441     filters requires a knowledge of 
3442      <A
3443 HREF="http://en.wikipedia.org/wiki/Regular_expressions"
3444 TARGET="_top"
3445 ><SPAN
3446 CLASS="QUOTE"
3447 >"Regular
3448      Expressions"</SPAN
3449 ></A
3450 > and 
3451       <A
3452 HREF="http://en.wikipedia.org/wiki/Html"
3453 TARGET="_top"
3454 ><SPAN
3455 CLASS="QUOTE"
3456 >"HTML"</SPAN
3457 ></A
3458 >.
3459     This is very powerful feature, and potentially very intrusive. 
3460     Filters should be used with caution, and where an equivalent
3461     <SPAN
3462 CLASS="QUOTE"
3463 >"action"</SPAN
3464 > is not available.
3465    </P
3466 ><P
3467 >    The amount of data that can be filtered is limited to the 
3468     <TT
3469 CLASS="LITERAL"
3470 ><A
3471 HREF="config.html#BUFFER-LIMIT"
3472 >buffer-limit</A
3473 ></TT
3474 >
3475     option in the main <A
3476 HREF="config.html"
3477 >config file</A
3478 >. The 
3479     default is 4096 KB (4 Megs). Once this limit is exceeded, the buffered
3480     data, and all pending data, is passed through unfiltered. 
3481    </P
3482 ><P
3483 >    Inappropriate MIME types, such as zipped files, are not filtered at all.
3484     (Again, only text-based types except plain text). Encrypted SSL data
3485     (from HTTPS servers) cannot be filtered either, since this would violate
3486     the integrity of the secure transaction. In some situations it might
3487     be necessary to protect certain text, like source code, from filtering
3488     by defining appropriate <TT
3489 CLASS="LITERAL"
3490 >-filter</TT
3491 > exceptions.
3492    </P
3493 ><P
3494 >    Compressed content can't be filtered either, unless <SPAN
3495 CLASS="APPLICATION"
3496 >Privoxy</SPAN
3497 >
3498     is compiled with zlib support (requires at least <SPAN
3499 CLASS="APPLICATION"
3500 >Privoxy</SPAN
3501 > 3.0.7),
3502     in which case <SPAN
3503 CLASS="APPLICATION"
3504 >Privoxy</SPAN
3505 > will decompress the content before filtering
3506     it.
3507    </P
3508 ><P
3509 >    If you use a <SPAN
3510 CLASS="APPLICATION"
3511 >Privoxy</SPAN
3512 > version without zlib support, but want filtering to work on
3513     as much documents as possible, even those that would normally be sent compressed,
3514     you must use the <TT
3515 CLASS="LITERAL"
3516 ><A
3517 HREF="actions-file.html#PREVENT-COMPRESSION"
3518 >prevent-compression</A
3519 ></TT
3520 >
3521     action in conjunction with <TT
3522 CLASS="LITERAL"
3523 >filter</TT
3524 >.
3525    </P
3526 ><P
3527 >    Content filtering can achieve some of the same effects as the 
3528     <TT
3529 CLASS="LITERAL"
3530 ><A
3531 HREF="actions-file.html#BLOCK"
3532 >block</A
3533 ></TT
3534 >
3535     action, i.e. it can be used to block ads and banners. But the mechanism 
3536     works quite differently. One effective use, is to block ad banners 
3537     based on their size (see below), since many of these seem to be somewhat 
3538     standardized.
3539    </P
3540 ><P
3541 >    <A
3542 HREF="contact.html"
3543 >Feedback</A
3544 > with suggestions for new or
3545     improved filters is particularly welcome!
3546    </P
3547 ><P
3548 >    The below list has only the names and a one-line description of each
3549     predefined filter. There are <A
3550 HREF="filter-file.html#PREDEFINED-FILTERS"
3551 >more
3552     verbose explanations</A
3553 > of what these filters do in the <A
3554 HREF="filter-file.html"
3555 >filter file chapter</A
3556 >.
3557    </P
3558 ></DD
3559 ><DT
3560 >Example usage (with filters from the distribution <TT
3561 CLASS="FILENAME"
3562 >default.filter</TT
3563 > file).
3564   See <A
3565 HREF="filter-file.html#PREDEFINED-FILTERS"
3566 >the Predefined Filters section</A
3567 > for 
3568   more explanation on each:</DT
3569 ><DD
3570 ><P
3571 >    <A
3572 NAME="FILTER-JS-ANNOYANCES"
3573 ></A
3574 >
3575     <TABLE
3576 BORDER="0"
3577 BGCOLOR="#E0E0E0"
3578 WIDTH="90%"
3579 ><TR
3580 ><TD
3581 ><PRE
3582 CLASS="SCREEN"
3583 >+filter{js-annoyances}       # Get rid of particularly annoying JavaScript abuse</PRE
3584 ></TD
3585 ></TR
3586 ></TABLE
3587 >
3588    </P
3589 ><P
3590 >    <A
3591 NAME="FILTER-JS-EVENTS"
3592 ></A
3593 >
3594     <TABLE
3595 BORDER="0"
3596 BGCOLOR="#E0E0E0"
3597 WIDTH="90%"
3598 ><TR
3599 ><TD
3600 ><PRE
3601 CLASS="SCREEN"
3602 >+filter{js-events}           # Kill all JS event bindings (Radically destructive! Only for extra nasty sites)</PRE
3603 ></TD
3604 ></TR
3605 ></TABLE
3606 >
3607    </P
3608 ><P
3609 >    <A
3610 NAME="FILTER-HTML-ANNOYANCES"
3611 ></A
3612 >
3613     <TABLE
3614 BORDER="0"
3615 BGCOLOR="#E0E0E0"
3616 WIDTH="90%"
3617 ><TR
3618 ><TD
3619 ><PRE
3620 CLASS="SCREEN"
3621 >+filter{html-annoyances}     # Get rid of particularly annoying HTML abuse</PRE
3622 ></TD
3623 ></TR
3624 ></TABLE
3625 >
3626    </P
3627 ><P
3628 >    <A
3629 NAME="FILTER-CONTENT-COOKIES"
3630 ></A
3631 >
3632     <TABLE
3633 BORDER="0"
3634 BGCOLOR="#E0E0E0"
3635 WIDTH="90%"
3636 ><TR
3637 ><TD
3638 ><PRE
3639 CLASS="SCREEN"
3640 >+filter{content-cookies}     # Kill cookies that come in the HTML or JS content</PRE
3641 ></TD
3642 ></TR
3643 ></TABLE
3644 >
3645    </P
3646 ><P
3647 >    <A
3648 NAME="FILTER-REFRESH-TAGS"
3649 ></A
3650 >
3651     <TABLE
3652 BORDER="0"
3653 BGCOLOR="#E0E0E0"
3654 WIDTH="90%"
3655 ><TR
3656 ><TD
3657 ><PRE
3658 CLASS="SCREEN"
3659 >+filter{refresh-tags}        # Kill automatic refresh tags (for dial-on-demand setups)</PRE
3660 ></TD
3661 ></TR
3662 ></TABLE
3663 >
3664    </P
3665 ><P
3666 >    <A
3667 NAME="FILTER-UNSOLICITED-POPUPS"
3668 ></A
3669 >
3670     <TABLE
3671 BORDER="0"
3672 BGCOLOR="#E0E0E0"
3673 WIDTH="90%"
3674 ><TR
3675 ><TD
3676 ><PRE
3677 CLASS="SCREEN"
3678 >+filter{unsolicited-popups}  # Disable only unsolicited pop-up windows. Useful if your browser lacks this ability.</PRE
3679 ></TD
3680 ></TR
3681 ></TABLE
3682 >
3683    </P
3684 ><P
3685 >    <A
3686 NAME="FILTER-ALL-POPUPS"
3687 ></A
3688 >
3689     <TABLE
3690 BORDER="0"
3691 BGCOLOR="#E0E0E0"
3692 WIDTH="90%"
3693 ><TR
3694 ><TD
3695 ><PRE
3696 CLASS="SCREEN"
3697 >+filter{all-popups}          # Kill all popups in JavaScript and HTML. Useful if your browser lacks this ability.</PRE
3698 ></TD
3699 ></TR
3700 ></TABLE
3701 >
3702    </P
3703 ><P
3704 >    <A
3705 NAME="FILTER-IMG-REORDER"
3706 ></A
3707 >
3708     <TABLE
3709 BORDER="0"
3710 BGCOLOR="#E0E0E0"
3711 WIDTH="90%"
3712 ><TR
3713 ><TD
3714 ><PRE
3715 CLASS="SCREEN"
3716 >+filter{img-reorder}         # Reorder attributes in &#60;img&#62; tags to make the banners-by-* filters more effective</PRE
3717 ></TD
3718 ></TR
3719 ></TABLE
3720 >
3721    </P
3722 ><P
3723 >    <A
3724 NAME="FILTER-BANNERS-BY-SIZE"
3725 ></A
3726 >
3727     <TABLE
3728 BORDER="0"
3729 BGCOLOR="#E0E0E0"
3730 WIDTH="90%"
3731 ><TR
3732 ><TD
3733 ><PRE
3734 CLASS="SCREEN"
3735 >+filter{banners-by-size}     # Kill banners by size</PRE
3736 ></TD
3737 ></TR
3738 ></TABLE
3739 >
3740    </P
3741 ><P
3742 >    <A
3743 NAME="FILTER-BANNERS-BY-LINK"
3744 ></A
3745 >
3746     <TABLE
3747 BORDER="0"
3748 BGCOLOR="#E0E0E0"
3749 WIDTH="90%"
3750 ><TR
3751 ><TD
3752 ><PRE
3753 CLASS="SCREEN"
3754 >+filter{banners-by-link}     # Kill banners by their links to known clicktrackers</PRE
3755 ></TD
3756 ></TR
3757 ></TABLE
3758 >
3759    </P
3760 ><P
3761 >    <A
3762 NAME="FILTER-WEBBUGS"
3763 ></A
3764 >
3765     <TABLE
3766 BORDER="0"
3767 BGCOLOR="#E0E0E0"
3768 WIDTH="90%"
3769 ><TR
3770 ><TD
3771 ><PRE
3772 CLASS="SCREEN"
3773 >+filter{webbugs}             # Squish WebBugs (1x1 invisible GIFs used for user tracking)</PRE
3774 ></TD
3775 ></TR
3776 ></TABLE
3777 >
3778    </P
3779 ><P
3780 >    <A
3781 NAME="FILTER-TINY-TEXTFORMS"
3782 ></A
3783 >
3784     <TABLE
3785 BORDER="0"
3786 BGCOLOR="#E0E0E0"
3787 WIDTH="90%"
3788 ><TR
3789 ><TD
3790 ><PRE
3791 CLASS="SCREEN"
3792 >+filter{tiny-textforms}      # Extend those tiny textareas up to 40x80 and kill the hard wrap</PRE
3793 ></TD
3794 ></TR
3795 ></TABLE
3796 >
3797    </P
3798 ><P
3799 >    <A
3800 NAME="FILTER-JUMPING-WINDOWS"
3801 ></A
3802 >
3803     <TABLE
3804 BORDER="0"
3805 BGCOLOR="#E0E0E0"
3806 WIDTH="90%"
3807 ><TR
3808 ><TD
3809 ><PRE
3810 CLASS="SCREEN"
3811 >+filter{jumping-windows}     # Prevent windows from resizing and moving themselves</PRE
3812 ></TD
3813 ></TR
3814 ></TABLE
3815 >
3816    </P
3817 ><P
3818 >    <A
3819 NAME="FILTER-FRAMESET-BORDERS"
3820 ></A
3821 >
3822     <TABLE
3823 BORDER="0"
3824 BGCOLOR="#E0E0E0"
3825 WIDTH="90%"
3826 ><TR
3827 ><TD
3828 ><PRE
3829 CLASS="SCREEN"
3830 >+filter{frameset-borders}    # Give frames a border and make them resizeable</PRE
3831 ></TD
3832 ></TR
3833 ></TABLE
3834 >
3835    </P
3836 ><P
3837 >    <A
3838 NAME="FILTER-DEMORONIZER"
3839 ></A
3840 >
3841     <TABLE
3842 BORDER="0"
3843 BGCOLOR="#E0E0E0"
3844 WIDTH="90%"
3845 ><TR
3846 ><TD
3847 ><PRE
3848 CLASS="SCREEN"
3849 >+filter{demoronizer}         # Fix MS's non-standard use of standard charsets</PRE
3850 ></TD
3851 ></TR
3852 ></TABLE
3853 >
3854    </P
3855 ><P
3856 >    <A
3857 NAME="FILTER-SHOCKWAVE-FLASH"
3858 ></A
3859 >
3860     <TABLE
3861 BORDER="0"
3862 BGCOLOR="#E0E0E0"
3863 WIDTH="90%"
3864 ><TR
3865 ><TD
3866 ><PRE
3867 CLASS="SCREEN"
3868 >+filter{shockwave-flash}     # Kill embedded Shockwave Flash objects</PRE
3869 ></TD
3870 ></TR
3871 ></TABLE
3872 >
3873    </P
3874 ><P
3875 >    <A
3876 NAME="FILTER-QUICKTIME-KIOSKMODE"
3877 ></A
3878 >
3879     <TABLE
3880 BORDER="0"
3881 BGCOLOR="#E0E0E0"
3882 WIDTH="90%"
3883 ><TR
3884 ><TD
3885 ><PRE
3886 CLASS="SCREEN"
3887 >+filter{quicktime-kioskmode} # Make Quicktime movies savable</PRE
3888 ></TD
3889 ></TR
3890 ></TABLE
3891 >
3892    </P
3893 ><P
3894 >    <A
3895 NAME="FILTER-FUN"
3896 ></A
3897 >
3898     <TABLE
3899 BORDER="0"
3900 BGCOLOR="#E0E0E0"
3901 WIDTH="90%"
3902 ><TR
3903 ><TD
3904 ><PRE
3905 CLASS="SCREEN"
3906 >+filter{fun}                 # Text replacements for subversive browsing fun!</PRE
3907 ></TD
3908 ></TR
3909 ></TABLE
3910 >
3911    </P
3912 ><P
3913 >    <A
3914 NAME="FILTER-CRUDE-PARENTAL"
3915 ></A
3916 >
3917     <TABLE
3918 BORDER="0"
3919 BGCOLOR="#E0E0E0"
3920 WIDTH="90%"
3921 ><TR
3922 ><TD
3923 ><PRE
3924 CLASS="SCREEN"
3925 >+filter{crude-parental}      # Crude parental filtering (demo only)</PRE
3926 ></TD
3927 ></TR
3928 ></TABLE
3929 >
3930    </P
3931 ><P
3932 >    <A
3933 NAME="FILTER-IE-EXPLOITS"
3934 ></A
3935 >
3936     <TABLE
3937 BORDER="0"
3938 BGCOLOR="#E0E0E0"
3939 WIDTH="90%"
3940 ><TR
3941 ><TD
3942 ><PRE
3943 CLASS="SCREEN"
3944 >+filter{ie-exploits}         # Disable a known Internet Explorer bug exploits</PRE
3945 ></TD
3946 ></TR
3947 ></TABLE
3948 >
3949    </P
3950 ><P
3951 >    <A
3952 NAME="FILTER-SITE-SPECIFICS"
3953 ></A
3954 >
3955     <TABLE
3956 BORDER="0"
3957 BGCOLOR="#E0E0E0"
3958 WIDTH="90%"
3959 ><TR
3960 ><TD
3961 ><PRE
3962 CLASS="SCREEN"
3963 >+filter{site-specifics}      # Custom filters for specific site related problems</PRE
3964 ></TD
3965 ></TR
3966 ></TABLE
3967 >
3968    </P
3969 ><P
3970 >    <A
3971 NAME="FILTER-GOOGLE"
3972 ></A
3973 >
3974     <TABLE
3975 BORDER="0"
3976 BGCOLOR="#E0E0E0"
3977 WIDTH="90%"
3978 ><TR
3979 ><TD
3980 ><PRE
3981 CLASS="SCREEN"
3982 >+filter{google}              # Removes text ads and other Google specific improvements</PRE
3983 ></TD
3984 ></TR
3985 ></TABLE
3986 >
3987    </P
3988 ><P
3989 >    <A
3990 NAME="FILTER-YAHOO"
3991 ></A
3992 >
3993     <TABLE
3994 BORDER="0"
3995 BGCOLOR="#E0E0E0"
3996 WIDTH="90%"
3997 ><TR
3998 ><TD
3999 ><PRE
4000 CLASS="SCREEN"
4001 >+filter{yahoo}               # Removes text ads and other Yahoo specific improvements</PRE
4002 ></TD
4003 ></TR
4004 ></TABLE
4005 >
4006    </P
4007 ><P
4008 >    <A
4009 NAME="FILTER-MSN"
4010 ></A
4011 >
4012     <TABLE
4013 BORDER="0"
4014 BGCOLOR="#E0E0E0"
4015 WIDTH="90%"
4016 ><TR
4017 ><TD
4018 ><PRE
4019 CLASS="SCREEN"
4020 >+filter{msn}                 # Removes text ads and other MSN specific improvements</PRE
4021 ></TD
4022 ></TR
4023 ></TABLE
4024 >
4025    </P
4026 ><P
4027 >    <A
4028 NAME="FILTER-BLOGSPOT"
4029 ></A
4030 >
4031     <TABLE
4032 BORDER="0"
4033 BGCOLOR="#E0E0E0"
4034 WIDTH="90%"
4035 ><TR
4036 ><TD
4037 ><PRE
4038 CLASS="SCREEN"
4039 >+filter{blogspot}            # Cleans up Blogspot blogs</PRE
4040 ></TD
4041 ></TR
4042 ></TABLE
4043 >
4044    </P
4045 ><P
4046 >    <A
4047 NAME="FILTER-NO-PING"
4048 ></A
4049 >
4050     <TABLE
4051 BORDER="0"
4052 BGCOLOR="#E0E0E0"
4053 WIDTH="90%"
4054 ><TR
4055 ><TD
4056 ><PRE
4057 CLASS="SCREEN"
4058 >+filter{no-ping}             # Removes non-standard ping attributes from anchor and area tags</PRE
4059 ></TD
4060 ></TR
4061 ></TABLE
4062 >
4063    </P
4064 ></DD
4065 ></DL
4066 ></DIV
4067 ></DIV
4068 ><DIV
4069 CLASS="SECT3"
4070 ><H4
4071 CLASS="SECT3"
4072 ><A
4073 NAME="FORCE-TEXT-MODE"
4074 >8.5.15. force-text-mode</A
4075 ></H4
4076 ><P
4077 ></P
4078 ><DIV
4079 CLASS="VARIABLELIST"
4080 ><DL
4081 ><DT
4082 >Typical use:</DT
4083 ><DD
4084 ><P
4085 >Force <SPAN
4086 CLASS="APPLICATION"
4087 >Privoxy</SPAN
4088 > to treat a document as if it was in some kind of <SPAN
4089 CLASS="emphasis"
4090 ><I
4091 CLASS="EMPHASIS"
4092 >text</I
4093 ></SPAN
4094 > format.   </P
4095 ></DD
4096 ><DT
4097 >Effect:</DT
4098 ><DD
4099 ><P
4100 >    Declares a document as text, even if the <SPAN
4101 CLASS="QUOTE"
4102 >"Content-Type:"</SPAN
4103 > isn't detected as such.
4104    </P
4105 ></DD
4106 ><DT
4107 >Type:</DT
4108 ><DD
4109 ><P
4110 >Boolean.</P
4111 ></DD
4112 ><DT
4113 >Parameter:</DT
4114 ><DD
4115 ><P
4116 >    N/A
4117    </P
4118 ></DD
4119 ><DT
4120 >Notes:</DT
4121 ><DD
4122 ><P
4123 >    As explained <TT
4124 CLASS="LITERAL"
4125 ><A
4126 HREF="actions-file.html#FILTER"
4127 >above</A
4128 ></TT
4129 >,
4130     <SPAN
4131 CLASS="APPLICATION"
4132 >Privoxy</SPAN
4133 > tries to only filter files that are
4134     in some kind of text format. The same restrictions apply to
4135     <TT
4136 CLASS="LITERAL"
4137 ><A
4138 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4139 >content-type-overwrite</A
4140 ></TT
4141 >.
4142     <TT
4143 CLASS="LITERAL"
4144 >force-text-mode</TT
4145 > declares a document as text,
4146     without looking at the <SPAN
4147 CLASS="QUOTE"
4148 >"Content-Type:"</SPAN
4149 > first.
4150    </P
4151 ><DIV
4152 CLASS="WARNING"
4153 ><P
4154 ></P
4155 ><TABLE
4156 CLASS="WARNING"
4157 BORDER="1"
4158 WIDTH="90%"
4159 ><TR
4160 ><TD
4161 ALIGN="CENTER"
4162 ><B
4163 >Warning</B
4164 ></TD
4165 ></TR
4166 ><TR
4167 ><TD
4168 ALIGN="LEFT"
4169 ><P
4170 >     Think twice before activating this action. Filtering binary data
4171      with regular expressions can cause file damage.
4172     </P
4173 ></TD
4174 ></TR
4175 ></TABLE
4176 ></DIV
4177 ></DD
4178 ><DT
4179 >Example usage:</DT
4180 ><DD
4181 ><P
4182 >     <TABLE
4183 BORDER="0"
4184 BGCOLOR="#E0E0E0"
4185 WIDTH="90%"
4186 ><TR
4187 ><TD
4188 ><PRE
4189 CLASS="SCREEN"
4190 >+force-text-mode
4191      </PRE
4192 ></TD
4193 ></TR
4194 ></TABLE
4195 >
4196    </P
4197 ></DD
4198 ></DL
4199 ></DIV
4200 ></DIV
4201 ><DIV
4202 CLASS="SECT3"
4203 ><H4
4204 CLASS="SECT3"
4205 ><A
4206 NAME="FORWARD-OVERRIDE"
4207 >8.5.16. forward-override</A
4208 ></H4
4209 ><P
4210 ></P
4211 ><DIV
4212 CLASS="VARIABLELIST"
4213 ><DL
4214 ><DT
4215 >Typical use:</DT
4216 ><DD
4217 ><P
4218 >Change the forwarding settings based on User-Agent or request origin</P
4219 ></DD
4220 ><DT
4221 >Effect:</DT
4222 ><DD
4223 ><P
4224 >    Overrules the forward directives in the configuration file.
4225    </P
4226 ></DD
4227 ><DT
4228 >Type:</DT
4229 ><DD
4230 ><P
4231 >Multi-value.</P
4232 ></DD
4233 ><DT
4234 >Parameter:</DT
4235 ><DD
4236 ><P
4237 ></P
4238 ><UL
4239 ><LI
4240 ><P
4241 ><SPAN
4242 CLASS="QUOTE"
4243 >"forward ."</SPAN
4244 > to use a direct connection without any additional proxies.</P
4245 ></LI
4246 ><LI
4247 ><P
4248 >      <SPAN
4249 CLASS="QUOTE"
4250 >"forward 127.0.0.1:8123"</SPAN
4251 > to use the HTTP proxy listening at 127.0.0.1 port 8123.
4252      </P
4253 ></LI
4254 ><LI
4255 ><P
4256 >      <SPAN
4257 CLASS="QUOTE"
4258 >"forward-socks4a 127.0.0.1:9050 ."</SPAN
4259 > to use the socks4a proxy listening at
4260       127.0.0.1 port 9050. Replace <SPAN
4261 CLASS="QUOTE"
4262 >"forward-socks4a"</SPAN
4263 > with <SPAN
4264 CLASS="QUOTE"
4265 >"forward-socks4"</SPAN
4266 >
4267       to use a socks4 connection  (with local DNS resolution) instead.
4268      </P
4269 ></LI
4270 ><LI
4271 ><P
4272 >      <SPAN
4273 CLASS="QUOTE"
4274 >"forward-socks4a 127.0.0.1:9050 proxy.example.org:8000"</SPAN
4275 > to use the socks4a proxy
4276       listening at 127.0.0.1 port 9050 to reach the HTTP proxy listening at proxy.example.org port 8000.
4277       Replace <SPAN
4278 CLASS="QUOTE"
4279 >"forward-socks4a"</SPAN
4280 > with <SPAN
4281 CLASS="QUOTE"
4282 >"forward-socks4"</SPAN
4283 > to use a socks4 connection
4284       (with local DNS resolution) instead.
4285      </P
4286 ></LI
4287 ></UL
4288 ></DD
4289 ><DT
4290 >Notes:</DT
4291 ><DD
4292 ><P
4293 >    This action takes parameters similar to the 
4294     <A
4295 HREF="config.html#FORWARDING"
4296 >forward</A
4297 > directives in the configuration
4298     file, but without the URL pattern. It can be used as replacement, but normally it's only
4299     used in cases where matching based on the request URL isn't sufficient.
4300    </P
4301 ><DIV
4302 CLASS="WARNING"
4303 ><P
4304 ></P
4305 ><TABLE
4306 CLASS="WARNING"
4307 BORDER="1"
4308 WIDTH="90%"
4309 ><TR
4310 ><TD
4311 ALIGN="CENTER"
4312 ><B
4313 >Warning</B
4314 ></TD
4315 ></TR
4316 ><TR
4317 ><TD
4318 ALIGN="LEFT"
4319 ><P
4320 >     Please read the description for the <A
4321 HREF="config.html#FORWARDING"
4322 >forward</A
4323 > directives before
4324      using this action. Forwarding to the wrong people will reduce your privacy and increase the
4325      chances of man-in-the-middle attacks.
4326     </P
4327 ><P
4328 >     If the ports are missing or invalid, default values will be used. This might change
4329      in the future and you shouldn't rely on it. Otherwise incorrect syntax causes Privoxy
4330      to exit.
4331     </P
4332 ><P
4333 >     Use the <A
4334 HREF="http://config.privoxy.org/show-url-info"
4335 TARGET="_top"
4336 >show-url-info CGI page</A
4337 >
4338      to verify that your forward settings do what you thought the do.
4339     </P
4340 ></TD
4341 ></TR
4342 ></TABLE
4343 ></DIV
4344 ></DD
4345 ><DT
4346 >Example usage:</DT
4347 ><DD
4348 ><P
4349 >     <TABLE
4350 BORDER="0"
4351 BGCOLOR="#E0E0E0"
4352 WIDTH="90%"
4353 ><TR
4354 ><TD
4355 ><PRE
4356 CLASS="SCREEN"
4357 ># Always use direct connections for requests previously tagged as
4358 # <SPAN
4359 CLASS="QUOTE"
4360 >"User-Agent: fetch libfetch/2.0"</SPAN
4361 > and make sure
4362 # resuming downloads continues to work.
4363 # This way you can continue to use Tor for your normal browsing,
4364 # without overloading the Tor network with your FreeBSD ports updates
4365 # or downloads of bigger files like ISOs.
4366 # Note that HTTP headers are easy to fake and therefore their
4367 # values are as (un)trustworthy as your clients and users.
4368 {+forward-override{forward .} \
4369  -hide-if-modified-since      \
4370  -overwrite-last-modified     \
4371 }
4372 TAG:^User-Agent: fetch libfetch/2\.0$
4373      </PRE
4374 ></TD
4375 ></TR
4376 ></TABLE
4377 >
4378    </P
4379 ></DD
4380 ></DL
4381 ></DIV
4382 ></DIV
4383 ><DIV
4384 CLASS="SECT3"
4385 ><H4
4386 CLASS="SECT3"
4387 ><A
4388 NAME="HANDLE-AS-EMPTY-DOCUMENT"
4389 >8.5.17. handle-as-empty-document</A
4390 ></H4
4391 ><P
4392 ></P
4393 ><DIV
4394 CLASS="VARIABLELIST"
4395 ><DL
4396 ><DT
4397 >Typical use:</DT
4398 ><DD
4399 ><P
4400 >Mark URLs that should be replaced by empty documents <SPAN
4401 CLASS="emphasis"
4402 ><I
4403 CLASS="EMPHASIS"
4404 >if they get blocked</I
4405 ></SPAN
4406 ></P
4407 ></DD
4408 ><DT
4409 >Effect:</DT
4410 ><DD
4411 ><P
4412 >    This action alone doesn't do anything noticeable. It just marks URLs.
4413     If the <TT
4414 CLASS="LITERAL"
4415 ><A
4416 HREF="actions-file.html#BLOCK"
4417 >block</A
4418 ></TT
4419 > action <SPAN
4420 CLASS="emphasis"
4421 ><I
4422 CLASS="EMPHASIS"
4423 >also applies</I
4424 ></SPAN
4425 >,
4426     the presence or absence of this mark decides whether an HTML <SPAN
4427 CLASS="QUOTE"
4428 >"BLOCKED"</SPAN
4429 >
4430     page, or an empty document will be sent to the client as a substitute for the blocked content.
4431     The <SPAN
4432 CLASS="emphasis"
4433 ><I
4434 CLASS="EMPHASIS"
4435 >empty</I
4436 ></SPAN
4437 > document isn't literally empty, but actually contains a single space.
4438    </P
4439 ></DD
4440 ><DT
4441 >Type:</DT
4442 ><DD
4443 ><P
4444 >Boolean.</P
4445 ></DD
4446 ><DT
4447 >Parameter:</DT
4448 ><DD
4449 ><P
4450 >    N/A
4451    </P
4452 ></DD
4453 ><DT
4454 >Notes:</DT
4455 ><DD
4456 ><P
4457 >    Some browsers complain about syntax errors if JavaScript documents
4458     are blocked with <SPAN
4459 CLASS="APPLICATION"
4460 >Privoxy's</SPAN
4461 >
4462     default HTML page; this option can be used to silence them.
4463     And of course this action can also be used to eliminate the <SPAN
4464 CLASS="APPLICATION"
4465 >Privoxy</SPAN
4466 >
4467     BLOCKED message in frames.
4468    </P
4469 ><P
4470 >    The content type for the empty document can be specified with
4471     <TT
4472 CLASS="LITERAL"
4473 ><A
4474 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
4475 >content-type-overwrite{}</A
4476 ></TT
4477 >,
4478     but usually this isn't necessary.
4479    </P
4480 ></DD
4481 ><DT
4482 >Example usage:</DT
4483 ><DD
4484 ><P
4485 >     <TABLE
4486 BORDER="0"
4487 BGCOLOR="#E0E0E0"
4488 WIDTH="90%"
4489 ><TR
4490 ><TD
4491 ><PRE
4492 CLASS="SCREEN"
4493 ># Block all documents on example.org that end with ".js",
4494 # but send an empty document instead of the usual HTML message. 
4495 {+block +handle-as-empty-document}
4496 example.org/.*\.js$
4497      </PRE
4498 ></TD
4499 ></TR
4500 ></TABLE
4501 >
4502    </P
4503 ></DD
4504 ></DL
4505 ></DIV
4506 ></DIV
4507 ><DIV
4508 CLASS="SECT3"
4509 ><H4
4510 CLASS="SECT3"
4511 ><A
4512 NAME="HANDLE-AS-IMAGE"
4513 >8.5.18. handle-as-image</A
4514 ></H4
4515 ><P
4516 ></P
4517 ><DIV
4518 CLASS="VARIABLELIST"
4519 ><DL
4520 ><DT
4521 >Typical use:</DT
4522 ><DD
4523 ><P
4524 >Mark URLs as belonging to images (so they'll be replaced by images <SPAN
4525 CLASS="emphasis"
4526 ><I
4527 CLASS="EMPHASIS"
4528 >if they do get blocked</I
4529 ></SPAN
4530 >, rather than HTML pages)</P
4531 ></DD
4532 ><DT
4533 >Effect:</DT
4534 ><DD
4535 ><P
4536 >    This action alone doesn't do anything noticeable. It just marks URLs as images.
4537     If the <TT
4538 CLASS="LITERAL"
4539 ><A
4540 HREF="actions-file.html#BLOCK"
4541 >block</A
4542 ></TT
4543 > action <SPAN
4544 CLASS="emphasis"
4545 ><I
4546 CLASS="EMPHASIS"
4547 >also applies</I
4548 ></SPAN
4549 >,
4550     the presence or absence of this mark decides whether an HTML <SPAN
4551 CLASS="QUOTE"
4552 >"blocked"</SPAN
4553 >
4554     page, or a replacement image (as determined by the <TT
4555 CLASS="LITERAL"
4556 ><A
4557 HREF="actions-file.html#SET-IMAGE-BLOCKER"
4558 >set-image-blocker</A
4559 ></TT
4560 > action) will be sent to the
4561     client as a substitute for the blocked content.
4562    </P
4563 ></DD
4564 ><DT
4565 >Type:</DT
4566 ><DD
4567 ><P
4568 >Boolean.</P
4569 ></DD
4570 ><DT
4571 >Parameter:</DT
4572 ><DD
4573 ><P
4574 >    N/A
4575    </P
4576 ></DD
4577 ><DT
4578 >Notes:</DT
4579 ><DD
4580 ><P
4581 >    The below generic example section is actually part of <TT
4582 CLASS="FILENAME"
4583 >default.action</TT
4584 >.
4585     It marks all URLs with well-known image file name extensions as images and should
4586     be left intact. 
4587    </P
4588 ><P
4589 >    Users will probably only want to use the handle-as-image action in conjunction with
4590     <TT
4591 CLASS="LITERAL"
4592 ><A
4593 HREF="actions-file.html#BLOCK"
4594 >block</A
4595 ></TT
4596 >, to block sources of banners, whose URLs don't
4597     reflect the file type, like in the second example section.
4598    </P
4599 ><P
4600 >    Note that you cannot treat HTML pages as images in most cases. For instance, (in-line) ad
4601     frames require an HTML page to be sent, or they won't display properly.
4602     Forcing <TT
4603 CLASS="LITERAL"
4604 >handle-as-image</TT
4605 > in this situation will not replace the
4606     ad frame with an image, but lead to error messages.
4607    </P
4608 ></DD
4609 ><DT
4610 >Example usage (sections):</DT
4611 ><DD
4612 ><P
4613 >     <TABLE
4614 BORDER="0"
4615 BGCOLOR="#E0E0E0"
4616 WIDTH="90%"
4617 ><TR
4618 ><TD
4619 ><PRE
4620 CLASS="SCREEN"
4621 ># Generic image extensions:
4622 #
4623 {+handle-as-image}
4624 /.*\.(gif|jpg|jpeg|png|bmp|ico)$
4625
4626 # These don't look like images, but they're banners and should be
4627 # blocked as images:
4628 #
4629 {+block +handle-as-image}
4630 some.nasty-banner-server.com/junk.cgi\?output=trash
4631
4632 # Banner source! Who cares if they also have non-image content?
4633 ad.doubleclick.net </PRE
4634 ></TD
4635 ></TR
4636 ></TABLE
4637 >
4638    </P
4639 ></DD
4640 ></DL
4641 ></DIV
4642 ></DIV
4643 ><DIV
4644 CLASS="SECT3"
4645 ><H4
4646 CLASS="SECT3"
4647 ><A
4648 NAME="HIDE-ACCEPT-LANGUAGE"
4649 >8.5.19. hide-accept-language</A
4650 ></H4
4651 ><P
4652 ></P
4653 ><DIV
4654 CLASS="VARIABLELIST"
4655 ><DL
4656 ><DT
4657 >Typical use:</DT
4658 ><DD
4659 ><P
4660 >Pretend to use different language settings.</P
4661 ></DD
4662 ><DT
4663 >Effect:</DT
4664 ><DD
4665 ><P
4666 >    Deletes or replaces the <SPAN
4667 CLASS="QUOTE"
4668 >"Accept-Language:"</SPAN
4669 > HTTP header in client requests.
4670    </P
4671 ></DD
4672 ><DT
4673 >Type:</DT
4674 ><DD
4675 ><P
4676 >Parameterized.</P
4677 ></DD
4678 ><DT
4679 >Parameter:</DT
4680 ><DD
4681 ><P
4682 >    Keyword: <SPAN
4683 CLASS="QUOTE"
4684 >"block"</SPAN
4685 >, or any user defined value.
4686    </P
4687 ></DD
4688 ><DT
4689 >Notes:</DT
4690 ><DD
4691 ><P
4692 >    Faking the browser's language settings can be useful to make a
4693     foreign User-Agent set with
4694     <TT
4695 CLASS="LITERAL"
4696 ><A
4697 HREF="actions-file.html#HIDE-USER-AGENT"
4698 >hide-user-agent</A
4699 ></TT
4700 >
4701     more believable.
4702    </P
4703 ><P
4704 >    However some sites with content in different languages check the
4705     <SPAN
4706 CLASS="QUOTE"
4707 >"Accept-Language:"</SPAN
4708 > to decide which one to take by default.
4709     Sometimes it isn't possible to later switch to another language without
4710     changing the <SPAN
4711 CLASS="QUOTE"
4712 >"Accept-Language:"</SPAN
4713 > header first.
4714    </P
4715 ><P
4716 >    Therefore it's a good idea to either only change the
4717     <SPAN
4718 CLASS="QUOTE"
4719 >"Accept-Language:"</SPAN
4720 > header to languages you understand,
4721     or to languages that aren't wide spread.
4722    </P
4723 ><P
4724 >    Before setting the <SPAN
4725 CLASS="QUOTE"
4726 >"Accept-Language:"</SPAN
4727 > header
4728     to a rare language, you should consider that it helps to
4729     make your requests unique and thus easier to trace.
4730     If you don't plan to change this header frequently,
4731     you should stick to a common language. 
4732    </P
4733 ></DD
4734 ><DT
4735 >Example usage (section):</DT
4736 ><DD
4737 ><P
4738 >     <TABLE
4739 BORDER="0"
4740 BGCOLOR="#E0E0E0"
4741 WIDTH="90%"
4742 ><TR
4743 ><TD
4744 ><PRE
4745 CLASS="SCREEN"
4746 ># Pretend to use Canadian language settings.
4747 {+hide-accept-language{en-ca} \
4748 +hide-user-agent{Mozilla/5.0 (X11; U; OpenBSD i386; en-CA; rv:1.8.0.4) Gecko/20060628 Firefox/1.5.0.4} \
4749 }
4750 /   </PRE
4751 ></TD
4752 ></TR
4753 ></TABLE
4754 >
4755    </P
4756 ></DD
4757 ></DL
4758 ></DIV
4759 ></DIV
4760 ><DIV
4761 CLASS="SECT3"
4762 ><H4
4763 CLASS="SECT3"
4764 ><A
4765 NAME="HIDE-CONTENT-DISPOSITION"
4766 >8.5.20. hide-content-disposition</A
4767 ></H4
4768 ><P
4769 ></P
4770 ><DIV
4771 CLASS="VARIABLELIST"
4772 ><DL
4773 ><DT
4774 >Typical use:</DT
4775 ><DD
4776 ><P
4777 >Prevent download menus for content you prefer to view inside the browser.</P
4778 ></DD
4779 ><DT
4780 >Effect:</DT
4781 ><DD
4782 ><P
4783 >    Deletes or replaces the <SPAN
4784 CLASS="QUOTE"
4785 >"Content-Disposition:"</SPAN
4786 > HTTP header set by some servers.
4787    </P
4788 ></DD
4789 ><DT
4790 >Type:</DT
4791 ><DD
4792 ><P
4793 >Parameterized.</P
4794 ></DD
4795 ><DT
4796 >Parameter:</DT
4797 ><DD
4798 ><P
4799 >    Keyword: <SPAN
4800 CLASS="QUOTE"
4801 >"block"</SPAN
4802 >, or any user defined value.
4803    </P
4804 ></DD
4805 ><DT
4806 >Notes:</DT
4807 ><DD
4808 ><P
4809 >    Some servers set the <SPAN
4810 CLASS="QUOTE"
4811 >"Content-Disposition:"</SPAN
4812 > HTTP header for
4813     documents they assume you want to save locally before viewing them.
4814     The <SPAN
4815 CLASS="QUOTE"
4816 >"Content-Disposition:"</SPAN
4817 > header contains the file name
4818     the browser is supposed to use by default.
4819    </P
4820 ><P
4821 >    In most browsers that understand this header, it makes it impossible to
4822     <SPAN
4823 CLASS="emphasis"
4824 ><I
4825 CLASS="EMPHASIS"
4826 >just view</I
4827 ></SPAN
4828 > the document, without downloading it first,
4829     even if it's just a simple text file or an image.
4830    </P
4831 ><P
4832 >    Removing the <SPAN
4833 CLASS="QUOTE"
4834 >"Content-Disposition:"</SPAN
4835 > header helps
4836     to prevent this annoyance, but some browsers additionally check the
4837     <SPAN
4838 CLASS="QUOTE"
4839 >"Content-Type:"</SPAN
4840 > header, before they decide if they can
4841     display a document without saving it first. In these cases, you have
4842     to change this header as well, before the browser stops displaying
4843     download menus.
4844    </P
4845 ><P
4846 >    It is also possible to change the server's file name suggestion
4847     to another one, but in most cases it isn't worth the time to set
4848     it up.
4849    </P
4850 ><P
4851 >    This action will probably be removed in the future,
4852     use server-header filters instead.
4853    </P
4854 ></DD
4855 ><DT
4856 >Example usage:</DT
4857 ><DD
4858 ><P
4859 >     <TABLE
4860 BORDER="0"
4861 BGCOLOR="#E0E0E0"
4862 WIDTH="90%"
4863 ><TR
4864 ><TD
4865 ><PRE
4866 CLASS="SCREEN"
4867 ># Disarm the download link in Sourceforge's patch tracker
4868 { -filter \
4869  +content-type-overwrite{text/plain}\
4870  +hide-content-disposition{block} }
4871  .sourceforge.net/tracker/download\.php</PRE
4872 ></TD
4873 ></TR
4874 ></TABLE
4875 >
4876    </P
4877 ></DD
4878 ></DL
4879 ></DIV
4880 ></DIV
4881 ><DIV
4882 CLASS="SECT3"
4883 ><H4
4884 CLASS="SECT3"
4885 ><A
4886 NAME="HIDE-IF-MODIFIED-SINCE"
4887 >8.5.21. hide-if-modified-since</A
4888 ></H4
4889 ><P
4890 ></P
4891 ><DIV
4892 CLASS="VARIABLELIST"
4893 ><DL
4894 ><DT
4895 >Typical use:</DT
4896 ><DD
4897 ><P
4898 >Prevent yet another way to track the user's steps between sessions.</P
4899 ></DD
4900 ><DT
4901 >Effect:</DT
4902 ><DD
4903 ><P
4904 >    Deletes the <SPAN
4905 CLASS="QUOTE"
4906 >"If-Modified-Since:"</SPAN
4907 > HTTP client header or modifies its value. 
4908    </P
4909 ></DD
4910 ><DT
4911 >Type:</DT
4912 ><DD
4913 ><P
4914 >Parameterized.</P
4915 ></DD
4916 ><DT
4917 >Parameter:</DT
4918 ><DD
4919 ><P
4920 >    Keyword: <SPAN
4921 CLASS="QUOTE"
4922 >"block"</SPAN
4923 >, or a user defined value that specifies a range of hours.
4924    </P
4925 ></DD
4926 ><DT
4927 >Notes:</DT
4928 ><DD
4929 ><P
4930 >    Removing this header is useful for filter testing, where you want to force a real
4931     reload instead of getting status code <SPAN
4932 CLASS="QUOTE"
4933 >"304"</SPAN
4934 >, which would cause the
4935     browser to use a cached copy of the page.
4936    </P
4937 ><P
4938 >    Instead of removing the header, <TT
4939 CLASS="LITERAL"
4940 >hide-if-modified-since</TT
4941 > can
4942     also add or subtract a random amount of time to/from the header's value.
4943     You specify a range of minutes where the random factor should be chosen from and
4944     <SPAN
4945 CLASS="APPLICATION"
4946 >Privoxy</SPAN
4947 > does the rest. A negative value means
4948     subtracting, a positive value adding.
4949    </P
4950 ><P
4951 >    Randomizing the value of the <SPAN
4952 CLASS="QUOTE"
4953 >"If-Modified-Since:"</SPAN
4954 > makes
4955     it less likely that the server can use the time as a cookie replacement,
4956     but you will run into caching problems if the random range is too high.
4957    </P
4958 ><P
4959 >    It is a good idea to only use a small negative value and let
4960     <TT
4961 CLASS="LITERAL"
4962 ><A
4963 HREF="actions-file.html#OVERWRITE-LAST-MODIFIED"
4964 >overwrite-last-modified</A
4965 ></TT
4966 >
4967     handle the greater changes.
4968    </P
4969 ><P
4970 >    It is also recommended to use this action together with
4971     <TT
4972 CLASS="LITERAL"
4973 ><A
4974 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
4975 >crunch-if-none-match</A
4976 ></TT
4977 >,
4978     otherwise it's more or less pointless.
4979    </P
4980 ></DD
4981 ><DT
4982 >Example usage (section):</DT
4983 ><DD
4984 ><P
4985 >     <TABLE
4986 BORDER="0"
4987 BGCOLOR="#E0E0E0"
4988 WIDTH="90%"
4989 ><TR
4990 ><TD
4991 ><PRE
4992 CLASS="SCREEN"
4993 ># Let the browser revalidate but make tracking based on the time less likely.
4994 {+hide-if-modified-since{-60} \
4995  +overwrite-last-modified{randomize} \
4996  +crunch-if-none-match}
4997 /</PRE
4998 ></TD
4999 ></TR
5000 ></TABLE
5001 >
5002    </P
5003 ></DD
5004 ></DL
5005 ></DIV
5006 ></DIV
5007 ><DIV
5008 CLASS="SECT3"
5009 ><H4
5010 CLASS="SECT3"
5011 ><A
5012 NAME="HIDE-FORWARDED-FOR-HEADERS"
5013 >8.5.22. hide-forwarded-for-headers</A
5014 ></H4
5015 ><P
5016 ></P
5017 ><DIV
5018 CLASS="VARIABLELIST"
5019 ><DL
5020 ><DT
5021 >Typical use:</DT
5022 ><DD
5023 ><P
5024 >Improve privacy by not forwarding the source of the request in the HTTP headers.</P
5025 ></DD
5026 ><DT
5027 >Effect:</DT
5028 ><DD
5029 ><P
5030 >    Deletes any existing <SPAN
5031 CLASS="QUOTE"
5032 >"X-Forwarded-for:"</SPAN
5033 > HTTP header from client requests.
5034    </P
5035 ></DD
5036 ><DT
5037 >Type:</DT
5038 ><DD
5039 ><P
5040 >Boolean.</P
5041 ></DD
5042 ><DT
5043 >Parameter:</DT
5044 ><DD
5045 ><P
5046 >    N/A
5047    </P
5048 ></DD
5049 ><DT
5050 >Notes:</DT
5051 ><DD
5052 ><P
5053 >    It is safe and recommended to leave this on.
5054    </P
5055 ></DD
5056 ><DT
5057 >Example usage:</DT
5058 ><DD
5059 ><P
5060 >     <TABLE
5061 BORDER="0"
5062 BGCOLOR="#E0E0E0"
5063 WIDTH="90%"
5064 ><TR
5065 ><TD
5066 ><PRE
5067 CLASS="SCREEN"
5068 >+hide-forwarded-for-headers</PRE
5069 ></TD
5070 ></TR
5071 ></TABLE
5072 >
5073    </P
5074 ></DD
5075 ></DL
5076 ></DIV
5077 ></DIV
5078 ><DIV
5079 CLASS="SECT3"
5080 ><H4
5081 CLASS="SECT3"
5082 ><A
5083 NAME="HIDE-FROM-HEADER"
5084 >8.5.23. hide-from-header</A
5085 ></H4
5086 ><P
5087 ></P
5088 ><DIV
5089 CLASS="VARIABLELIST"
5090 ><DL
5091 ><DT
5092 >Typical use:</DT
5093 ><DD
5094 ><P
5095 >Keep your (old and ill) browser from telling web servers your email address</P
5096 ></DD
5097 ><DT
5098 >Effect:</DT
5099 ><DD
5100 ><P
5101 >    Deletes any existing <SPAN
5102 CLASS="QUOTE"
5103 >"From:"</SPAN
5104 > HTTP header, or replaces it with the
5105     specified string.
5106    </P
5107 ></DD
5108 ><DT
5109 >Type:</DT
5110 ><DD
5111 ><P
5112 >Parameterized.</P
5113 ></DD
5114 ><DT
5115 >Parameter:</DT
5116 ><DD
5117 ><P
5118 >    Keyword: <SPAN
5119 CLASS="QUOTE"
5120 >"block"</SPAN
5121 >, or any user defined value.
5122    </P
5123 ></DD
5124 ><DT
5125 >Notes:</DT
5126 ><DD
5127 ><P
5128 >    The keyword <SPAN
5129 CLASS="QUOTE"
5130 >"block"</SPAN
5131 > will completely remove the header 
5132     (not to be confused with the <TT
5133 CLASS="LITERAL"
5134 ><A
5135 HREF="actions-file.html#BLOCK"
5136 >block</A
5137 ></TT
5138 >
5139     action).
5140    </P
5141 ><P
5142 >    Alternately, you can specify any value you prefer to be sent to the web
5143     server. If you do, it is a matter of fairness not to use any address that
5144     is actually used by a real person.
5145    </P
5146 ><P
5147 >    This action is rarely needed, as modern web browsers don't send
5148     <SPAN
5149 CLASS="QUOTE"
5150 >"From:"</SPAN
5151 > headers anymore.
5152    </P
5153 ></DD
5154 ><DT
5155 >Example usage:</DT
5156 ><DD
5157 ><P
5158 >    <TABLE
5159 BORDER="0"
5160 BGCOLOR="#E0E0E0"
5161 WIDTH="90%"
5162 ><TR
5163 ><TD
5164 ><PRE
5165 CLASS="SCREEN"
5166 >+hide-from-header{block}</PRE
5167 ></TD
5168 ></TR
5169 ></TABLE
5170 > or
5171     <TABLE
5172 BORDER="0"
5173 BGCOLOR="#E0E0E0"
5174 WIDTH="90%"
5175 ><TR
5176 ><TD
5177 ><PRE
5178 CLASS="SCREEN"
5179 >+hide-from-header{spam-me-senseless@sittingduck.example.com}</PRE
5180 ></TD
5181 ></TR
5182 ></TABLE
5183 >
5184    </P
5185 ></DD
5186 ></DL
5187 ></DIV
5188 ></DIV
5189 ><DIV
5190 CLASS="SECT3"
5191 ><H4
5192 CLASS="SECT3"
5193 ><A
5194 NAME="HIDE-REFERRER"
5195 >8.5.24. hide-referrer</A
5196 ></H4
5197 ><A
5198 NAME="HIDE-REFERER"
5199 ></A
5200 ><P
5201 ></P
5202 ><DIV
5203 CLASS="VARIABLELIST"
5204 ><DL
5205 ><DT
5206 >Typical use:</DT
5207 ><DD
5208 ><P
5209 >Conceal which link you followed to get to a particular site</P
5210 ></DD
5211 ><DT
5212 >Effect:</DT
5213 ><DD
5214 ><P
5215 >    Deletes the <SPAN
5216 CLASS="QUOTE"
5217 >"Referer:"</SPAN
5218 > (sic) HTTP header from the client request,
5219     or replaces it with a forged one.
5220    </P
5221 ></DD
5222 ><DT
5223 >Type:</DT
5224 ><DD
5225 ><P
5226 >Parameterized.</P
5227 ></DD
5228 ><DT
5229 >Parameter:</DT
5230 ><DD
5231 ><P
5232 ></P
5233 ><UL
5234 ><LI
5235 ><P
5236 ><SPAN
5237 CLASS="QUOTE"
5238 >"conditional-block"</SPAN
5239 > to delete the header completely if the host has changed.</P
5240 ></LI
5241 ><LI
5242 ><P
5243 ><SPAN
5244 CLASS="QUOTE"
5245 >"conditional-forge"</SPAN
5246 > to forge the header if the host has changed.</P
5247 ></LI
5248 ><LI
5249 ><P
5250 ><SPAN
5251 CLASS="QUOTE"
5252 >"block"</SPAN
5253 > to delete the header unconditionally.</P
5254 ></LI
5255 ><LI
5256 ><P
5257 ><SPAN
5258 CLASS="QUOTE"
5259 >"forge"</SPAN
5260 > to pretend to be coming from the homepage of the server we are talking to.</P
5261 ></LI
5262 ><LI
5263 ><P
5264 >Any other string to set a user defined referrer.</P
5265 ></LI
5266 ></UL
5267 ></DD
5268 ><DT
5269 >Notes:</DT
5270 ><DD
5271 ><P
5272 >    <TT
5273 CLASS="LITERAL"
5274 >conditional-block</TT
5275 > is the only parameter,
5276     that isn't easily detected in the server's log file. If it blocks the
5277     referrer, the request will look like the visitor used a bookmark or
5278     typed in the address directly.
5279    </P
5280 ><P
5281 >    Leaving the referrer unmodified for requests on the same host
5282     allows the server owner to see the visitor's <SPAN
5283 CLASS="QUOTE"
5284 >"click path"</SPAN
5285 >,
5286     but in most cases she could also get that information by comparing
5287     other parts of the log file: for example the User-Agent if it isn't
5288     a very common one, or the user's IP address if it doesn't change between
5289     different requests.
5290    </P
5291 ><P
5292 >    Always blocking the referrer, or using a custom one, can lead to
5293     failures on servers that check the referrer before they answer any
5294     requests, in an attempt to prevent their content from being
5295     embedded or linked to elsewhere.
5296    </P
5297 ><P
5298 >    Both <TT
5299 CLASS="LITERAL"
5300 >conditional-block</TT
5301 > and <TT
5302 CLASS="LITERAL"
5303 >forge</TT
5304 >
5305     will work with referrer checks, as long as content and valid referring page
5306     are on the same host. Most of the time that's the case.
5307    </P
5308 ><P
5309 >  
5310     <TT
5311 CLASS="LITERAL"
5312 >hide-referer</TT
5313 > is an alternate spelling of
5314     <TT
5315 CLASS="LITERAL"
5316 >hide-referrer</TT
5317 > and the two can be can be freely
5318     substituted with each other. (<SPAN
5319 CLASS="QUOTE"
5320 >"referrer"</SPAN
5321 > is the
5322     correct English spelling, however the HTTP specification has a bug - it
5323     requires it to be spelled as <SPAN
5324 CLASS="QUOTE"
5325 >"referer"</SPAN
5326 >.) 
5327    </P
5328 ></DD
5329 ><DT
5330 >Example usage:</DT
5331 ><DD
5332 ><P
5333 >     <TABLE
5334 BORDER="0"
5335 BGCOLOR="#E0E0E0"
5336 WIDTH="90%"
5337 ><TR
5338 ><TD
5339 ><PRE
5340 CLASS="SCREEN"
5341 >+hide-referrer{forge}</PRE
5342 ></TD
5343 ></TR
5344 ></TABLE
5345 > or
5346      <TABLE
5347 BORDER="0"
5348 BGCOLOR="#E0E0E0"
5349 WIDTH="90%"
5350 ><TR
5351 ><TD
5352 ><PRE
5353 CLASS="SCREEN"
5354 >+hide-referrer{http://www.yahoo.com/}</PRE
5355 ></TD
5356 ></TR
5357 ></TABLE
5358 >
5359    </P
5360 ></DD
5361 ></DL
5362 ></DIV
5363 ></DIV
5364 ><DIV
5365 CLASS="SECT3"
5366 ><H4
5367 CLASS="SECT3"
5368 ><A
5369 NAME="HIDE-USER-AGENT"
5370 >8.5.25. hide-user-agent</A
5371 ></H4
5372 ><P
5373 ></P
5374 ><DIV
5375 CLASS="VARIABLELIST"
5376 ><DL
5377 ><DT
5378 >Typical use:</DT
5379 ><DD
5380 ><P
5381 >Try to conceal your type of browser and client operating system</P
5382 ></DD
5383 ><DT
5384 >Effect:</DT
5385 ><DD
5386 ><P
5387 >    Replaces the value of the <SPAN
5388 CLASS="QUOTE"
5389 >"User-Agent:"</SPAN
5390 > HTTP header
5391     in client requests with the specified value.
5392    </P
5393 ></DD
5394 ><DT
5395 >Type:</DT
5396 ><DD
5397 ><P
5398 >Parameterized.</P
5399 ></DD
5400 ><DT
5401 >Parameter:</DT
5402 ><DD
5403 ><P
5404 >    Any user-defined string.
5405    </P
5406 ></DD
5407 ><DT
5408 >Notes:</DT
5409 ><DD
5410 ><DIV
5411 CLASS="WARNING"
5412 ><P
5413 ></P
5414 ><TABLE
5415 CLASS="WARNING"
5416 BORDER="1"
5417 WIDTH="90%"
5418 ><TR
5419 ><TD
5420 ALIGN="CENTER"
5421 ><B
5422 >Warning</B
5423 ></TD
5424 ></TR
5425 ><TR
5426 ><TD
5427 ALIGN="LEFT"
5428 ><P
5429 >     This can lead to problems on web sites that depend on looking at this header in
5430      order to customize their content for different browsers (which, by the
5431      way, is <SPAN
5432 CLASS="emphasis"
5433 ><I
5434 CLASS="EMPHASIS"
5435 >NOT</I
5436 ></SPAN
5437 > the right thing to do: good web sites
5438      work browser-independently). 
5439     </P
5440 ></TD
5441 ></TR
5442 ></TABLE
5443 ></DIV
5444 ><P
5445 >    Using this action in multi-user setups or wherever different types of
5446     browsers will access the same <SPAN
5447 CLASS="APPLICATION"
5448 >Privoxy</SPAN
5449 > is
5450     <SPAN
5451 CLASS="emphasis"
5452 ><I
5453 CLASS="EMPHASIS"
5454 >not recommended</I
5455 ></SPAN
5456 >. In single-user, single-browser
5457     setups, you might use it to delete your OS version information from
5458     the headers, because it is an invitation to exploit known bugs for your
5459     OS. It is also occasionally useful to forge this in order to access 
5460     sites that won't let you in otherwise (though there may be a good 
5461     reason in some cases). Example of this: some MSN sites will not 
5462     let <SPAN
5463 CLASS="APPLICATION"
5464 >Mozilla</SPAN
5465 > enter, yet forging to a 
5466     <SPAN
5467 CLASS="APPLICATION"
5468 >Netscape 6.1</SPAN
5469 > user-agent works just fine.
5470     (Must be just a silly MS goof, I'm sure :-).
5471    </P
5472 ><P
5473 >     More information on known user-agent strings can be found at 
5474      <A
5475 HREF="http://www.user-agents.org/"
5476 TARGET="_top"
5477 >http://www.user-agents.org/</A
5478 >
5479      and 
5480      <A
5481 HREF="http://en.wikipedia.org/wiki/User_agent"
5482 TARGET="_top"
5483 >http://en.wikipedia.org/wiki/User_agent</A
5484 >.
5485    </P
5486 ></DD
5487 ><DT
5488 >Example usage:</DT
5489 ><DD
5490 ><P
5491 >     <TABLE
5492 BORDER="0"
5493 BGCOLOR="#E0E0E0"
5494 WIDTH="90%"
5495 ><TR
5496 ><TD
5497 ><PRE
5498 CLASS="SCREEN"
5499 >+hide-user-agent{Netscape 6.1 (X11; I; Linux 2.4.18 i686)}</PRE
5500 ></TD
5501 ></TR
5502 ></TABLE
5503 >
5504    </P
5505 ></DD
5506 ></DL
5507 ></DIV
5508 ></DIV
5509 ><DIV
5510 CLASS="SECT3"
5511 ><H4
5512 CLASS="SECT3"
5513 ><A
5514 NAME="INSPECT-JPEGS"
5515 >8.5.26. inspect-jpegs</A
5516 ></H4
5517 ><P
5518 ></P
5519 ><DIV
5520 CLASS="VARIABLELIST"
5521 ><DL
5522 ><DT
5523 >Typical use:</DT
5524 ><DD
5525 ><P
5526 >Try to protect against a MS buffer over-run in JPEG processing</P
5527 ></DD
5528 ><DT
5529 >Effect:</DT
5530 ><DD
5531 ><P
5532 >    Protect against a known exploit
5533    </P
5534 ></DD
5535 ><DT
5536 >Type:</DT
5537 ><DD
5538 ><P
5539 >Boolean.</P
5540 ></DD
5541 ><DT
5542 >Parameter:</DT
5543 ><DD
5544 ><P
5545 >    N/A
5546    </P
5547 ></DD
5548 ><DT
5549 >Notes:</DT
5550 ><DD
5551 ><P
5552 >    See Microsoft Security Bulletin MS04-028. JPEG images are one of the most 
5553     common image types found across the Internet. The exploit as described can 
5554     allow execution of code on the target system, giving an attacker access 
5555     to the system in question by merely planting an altered JPEG image, which 
5556     would have no obvious indications of what lurks inside. This action
5557     tries to prevent this exploit if delivered through unencrypted HTTP.
5558    </P
5559 ><P
5560 >    Note that the exploit mentioned is several years old
5561     and it's unlikely that your client is still vulnerable
5562     against it. This action may be removed in one of the
5563     next releases.
5564    </P
5565 ></DD
5566 ><DT
5567 >Example usage:</DT
5568 ><DD
5569 ><P
5570 ><TABLE
5571 BORDER="0"
5572 BGCOLOR="#E0E0E0"
5573 WIDTH="90%"
5574 ><TR
5575 ><TD
5576 ><PRE
5577 CLASS="SCREEN"
5578 >+inspect-jpegs</PRE
5579 ></TD
5580 ></TR
5581 ></TABLE
5582 ></P
5583 ></DD
5584 ></DL
5585 ></DIV
5586 ></DIV
5587 ><DIV
5588 CLASS="SECT3"
5589 ><H4
5590 CLASS="SECT3"
5591 ><A
5592 NAME="KILL-POPUPS"
5593 >8.5.27. kill-popups<A
5594 NAME="KILL-POPUP"
5595 ></A
5596 ></A
5597 ></H4
5598 ><P
5599 ></P
5600 ><DIV
5601 CLASS="VARIABLELIST"
5602 ><DL
5603 ><DT
5604 >Typical use:</DT
5605 ><DD
5606 ><P
5607 >Eliminate those annoying pop-up windows (deprecated)</P
5608 ></DD
5609 ><DT
5610 >Effect:</DT
5611 ><DD
5612 ><P
5613 >    While loading the document, replace JavaScript code that opens
5614     pop-up windows with (syntactically neutral) dummy code on the fly.
5615    </P
5616 ></DD
5617 ><DT
5618 >Type:</DT
5619 ><DD
5620 ><P
5621 >Boolean.</P
5622 ></DD
5623 ><DT
5624 >Parameter:</DT
5625 ><DD
5626 ><P
5627 >    N/A
5628    </P
5629 ></DD
5630 ><DT
5631 >Notes:</DT
5632 ><DD
5633 ><P
5634 >    This action is basically a built-in, hardwired special-purpose filter
5635     action, but there are important differences: For <TT
5636 CLASS="LITERAL"
5637 >kill-popups</TT
5638 >,
5639     the document need not be buffered, so it can be incrementally rendered while
5640     downloading. But <TT
5641 CLASS="LITERAL"
5642 >kill-popups</TT
5643 > doesn't catch as many pop-ups as
5644     <TT
5645 CLASS="LITERAL"
5646 ><A
5647 HREF="actions-file.html#FILTER-ALL-POPUPS"
5648 >filter{<TT
5649 CLASS="REPLACEABLE"
5650 ><I
5651 >all-popups</I
5652 ></TT
5653 >}</A
5654 ></TT
5655 >
5656     does and is not as smart as <TT
5657 CLASS="LITERAL"
5658 ><A
5659 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5660 >filter{<TT
5661 CLASS="REPLACEABLE"
5662 ><I
5663 >unsolicited-popups</I
5664 ></TT
5665 >}</A
5666 >
5667     </TT
5668 >is.
5669    </P
5670 ><P
5671 >    Think of it as a fast and efficient replacement for a filter that you
5672     can use if you don't want any filtering at all. Note that it doesn't make
5673     sense to combine it with any <TT
5674 CLASS="LITERAL"
5675 ><A
5676 HREF="actions-file.html#FILTER"
5677 >filter</A
5678 ></TT
5679 > action,
5680     since as soon as one <TT
5681 CLASS="LITERAL"
5682 ><A
5683 HREF="actions-file.html#FILTER"
5684 >filter</A
5685 ></TT
5686 > applies,
5687     the whole document needs to be buffered anyway, which destroys the advantage of
5688     the <TT
5689 CLASS="LITERAL"
5690 >kill-popups</TT
5691 > action over its filter equivalent.
5692    </P
5693 ><P
5694 >    Killing all pop-ups unconditionally is problematic. Many shops and banks rely on
5695     pop-ups to display forms, shopping carts etc, and the <TT
5696 CLASS="LITERAL"
5697 ><A
5698 HREF="actions-file.html#FILTER-UNSOLICITED-POPUPS"
5699 >filter{<TT
5700 CLASS="REPLACEABLE"
5701 ><I
5702 >unsolicited-popups</I
5703 ></TT
5704 >}</A
5705 >
5706     </TT
5707 > does a better job of catching only the unwanted ones.
5708    </P
5709 ><P
5710 >    If the only kind of pop-ups that you want to kill are exit consoles (those
5711     <SPAN
5712 CLASS="emphasis"
5713 ><I
5714 CLASS="EMPHASIS"
5715 >really nasty</I
5716 ></SPAN
5717 > windows that appear when you close an other
5718     one), you might want to use
5719     <TT
5720 CLASS="LITERAL"
5721 ><A
5722 HREF="actions-file.html#FILTER"
5723 >filter</A
5724 >{<TT
5725 CLASS="REPLACEABLE"
5726 ><I
5727 >js-annoyances</I
5728 ></TT
5729 >}</TT
5730 >
5731     instead. 
5732    </P
5733 ><P
5734 >    This action is most appropriate for browsers that don't have any controls 
5735     for unwanted pop-ups. Not recommended for general usage.
5736    </P
5737 ><P
5738 >    This action doesn't work very reliable and may be removed in future releases.
5739    </P
5740 ></DD
5741 ><DT
5742 >Example usage:</DT
5743 ><DD
5744 ><P
5745 ><TABLE
5746 BORDER="0"
5747 BGCOLOR="#E0E0E0"
5748 WIDTH="90%"
5749 ><TR
5750 ><TD
5751 ><PRE
5752 CLASS="SCREEN"
5753 >+kill-popups</PRE
5754 ></TD
5755 ></TR
5756 ></TABLE
5757 ></P
5758 ></DD
5759 ></DL
5760 ></DIV
5761 ></DIV
5762 ><DIV
5763 CLASS="SECT3"
5764 ><H4
5765 CLASS="SECT3"
5766 ><A
5767 NAME="LIMIT-CONNECT"
5768 >8.5.28. limit-connect</A
5769 ></H4
5770 ><P
5771 ></P
5772 ><DIV
5773 CLASS="VARIABLELIST"
5774 ><DL
5775 ><DT
5776 >Typical use:</DT
5777 ><DD
5778 ><P
5779 >Prevent abuse of <SPAN
5780 CLASS="APPLICATION"
5781 >Privoxy</SPAN
5782 > as a TCP proxy relay or disable SSL for untrusted sites</P
5783 ></DD
5784 ><DT
5785 >Effect:</DT
5786 ><DD
5787 ><P
5788 >    Specifies to which ports HTTP CONNECT requests are allowable.
5789    </P
5790 ></DD
5791 ><DT
5792 >Type:</DT
5793 ><DD
5794 ><P
5795 >Parameterized.</P
5796 ></DD
5797 ><DT
5798 >Parameter:</DT
5799 ><DD
5800 ><P
5801 >    A comma-separated list of ports or port ranges (the latter using dashes, with the minimum
5802     defaulting to 0 and the maximum to 65K).
5803    </P
5804 ></DD
5805 ><DT
5806 >Notes:</DT
5807 ><DD
5808 ><P
5809 >    By default, i.e. if no <TT
5810 CLASS="LITERAL"
5811 >limit-connect</TT
5812 > action applies,
5813     <SPAN
5814 CLASS="APPLICATION"
5815 >Privoxy</SPAN
5816 > only allows HTTP CONNECT
5817     requests to port 443 (the standard, secure HTTPS port). Use 
5818     <TT
5819 CLASS="LITERAL"
5820 >limit-connect</TT
5821 > if more fine-grained control is desired
5822     for some or all destinations.
5823    </P
5824 ><P
5825 >    The CONNECT methods exists in HTTP to allow access to secure websites
5826     (<SPAN
5827 CLASS="QUOTE"
5828 >"https://"</SPAN
5829 > URLs) through proxies. It works very simply:
5830     the proxy connects to the server on the specified port, and then
5831     short-circuits its connections to the client and to the remote server.
5832     This means CONNECT-enabled proxies can be used as TCP relays very easily.
5833   </P
5834 ><P
5835 >   <SPAN
5836 CLASS="APPLICATION"
5837 >Privoxy</SPAN
5838 > relays HTTPS traffic without seeing
5839    the decoded content. Websites can leverage this limitation to circumvent <SPAN
5840 CLASS="APPLICATION"
5841 >Privoxy</SPAN
5842 >'s
5843    filters. By specifying an invalid port range you can disable HTTPS entirely.
5844    If you plan to disable SSL by default, consider enabling 
5845    <TT
5846 CLASS="LITERAL"
5847 ><A
5848 HREF="actions-file.html#TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
5849 >treat-forbidden-connects-like-blocks</A
5850 ></TT
5851 >
5852    as well, to be able to quickly create exceptions.
5853   </P
5854 ></DD
5855 ><DT
5856 >Example usages:</DT
5857 ><DD
5858 ><P
5859 >     <TABLE
5860 BORDER="0"
5861 BGCOLOR="#E0E0E0"
5862 WIDTH="90%"
5863 ><TR
5864 ><TD
5865 ><PRE
5866 CLASS="SCREEN"
5867 >+limit-connect{443}                   # This is the default and need not be specified.
5868 +limit-connect{80,443}                # Ports 80 and 443 are OK.
5869 +limit-connect{-3, 7, 20-100, 500-}   # Ports less than 3, 7, 20 to 100 and above 500 are OK.
5870 +limit-connect{-}                     # All ports are OK
5871 +limit-connect{,}                     # No HTTPS/SSL traffic is allowed</PRE
5872 ></TD
5873 ></TR
5874 ></TABLE
5875 >
5876    </P
5877 ></DD
5878 ></DL
5879 ></DIV
5880 ></DIV
5881 ><DIV
5882 CLASS="SECT3"
5883 ><H4
5884 CLASS="SECT3"
5885 ><A
5886 NAME="PREVENT-COMPRESSION"
5887 >8.5.29. prevent-compression</A
5888 ></H4
5889 ><P
5890 ></P
5891 ><DIV
5892 CLASS="VARIABLELIST"
5893 ><DL
5894 ><DT
5895 >Typical use:</DT
5896 ><DD
5897 ><P
5898 >    Ensure that servers send the content uncompressed, so it can be
5899     passed through <TT
5900 CLASS="LITERAL"
5901 ><A
5902 HREF="actions-file.html#FILTER"
5903 >filter</A
5904 ></TT
5905 >s.
5906    </P
5907 ></DD
5908 ><DT
5909 >Effect:</DT
5910 ><DD
5911 ><P
5912 >    Removes the Accept-Encoding header which can be used to ask for compressed transfer.
5913    </P
5914 ></DD
5915 ><DT
5916 >Type:</DT
5917 ><DD
5918 ><P
5919 >Boolean.</P
5920 ></DD
5921 ><DT
5922 >Parameter:</DT
5923 ><DD
5924 ><P
5925 >    N/A
5926    </P
5927 ></DD
5928 ><DT
5929 >Notes:</DT
5930 ><DD
5931 ><P
5932 >    More and more websites send their content compressed by default, which
5933     is generally a good idea and saves bandwidth. But the <TT
5934 CLASS="LITERAL"
5935 ><A
5936 HREF="actions-file.html#FILTER"
5937 >filter</A
5938 ></TT
5939 >, <TT
5940 CLASS="LITERAL"
5941 ><A
5942 HREF="actions-file.html#DEANIMATE-GIFS"
5943 >deanimate-gifs</A
5944 ></TT
5945 >
5946     and <TT
5947 CLASS="LITERAL"
5948 ><A
5949 HREF="actions-file.html#KILL-POPUPS"
5950 >kill-popups</A
5951 ></TT
5952 > actions need
5953     access to the uncompressed data.
5954    </P
5955 ><P
5956 >    When compiled with zlib support (available since <SPAN
5957 CLASS="APPLICATION"
5958 >Privoxy</SPAN
5959 > 3.0.7), content that should be
5960     filtered is decompressed on-the-fly and you don't have to worry about this action.
5961     If you are using an older <SPAN
5962 CLASS="APPLICATION"
5963 >Privoxy</SPAN
5964 > version, or one that hasn't been compiled with zlib
5965     support, this action can be used to convince the server to send the content uncompressed.
5966    </P
5967 ><P
5968 >    Most text-based instances compress very well, the size is seldom decreased by less than 50%,
5969     for markup-heavy instances like news feeds saving more than 90% of the original size isn't
5970     unusual. 
5971    </P
5972 ><P
5973 >    Not using compression will therefore slow down the transfer, and you should only
5974     enable this action if you really need it. As of <SPAN
5975 CLASS="APPLICATION"
5976 >Privoxy</SPAN
5977 > 3.0.7 it's disabled in all
5978     predefined action settings.
5979    </P
5980 ><P
5981 >    Note that some (rare) ill-configured sites don't handle requests for uncompressed
5982     documents correctly. Broken PHP applications tend to send an empty document body,
5983     some IIS versions only send the beginning of the content. If you enable
5984     <TT
5985 CLASS="LITERAL"
5986 >prevent-compression</TT
5987 > per default, you might want to add
5988     exceptions for those sites. See the example for how to do that.
5989    </P
5990 ></DD
5991 ><DT
5992 >Example usage (sections):</DT
5993 ><DD
5994 ><P
5995 >    <TABLE
5996 BORDER="0"
5997 BGCOLOR="#E0E0E0"
5998 WIDTH="90%"
5999 ><TR
6000 ><TD
6001 ><PRE
6002 CLASS="SCREEN"
6003 ># Selectively turn off compression, and enable a filter
6004 #
6005 { +filter{tiny-textforms} +prevent-compression }
6006 # Match only these sites
6007  .google.
6008  sourceforge.net
6009  sf.net
6010
6011 # Or instead, we could set a universal default:
6012 #
6013 { +prevent-compression }
6014  / # Match all sites
6015
6016 # Then maybe make exceptions for broken sites:
6017 #
6018 { -prevent-compression }
6019 .compusa.com/</PRE
6020 ></TD
6021 ></TR
6022 ></TABLE
6023 >
6024    </P
6025 ></DD
6026 ></DL
6027 ></DIV
6028 ></DIV
6029 ><DIV
6030 CLASS="SECT3"
6031 ><H4
6032 CLASS="SECT3"
6033 ><A
6034 NAME="OVERWRITE-LAST-MODIFIED"
6035 >8.5.30. overwrite-last-modified</A
6036 ></H4
6037 ><P
6038 ></P
6039 ><DIV
6040 CLASS="VARIABLELIST"
6041 ><DL
6042 ><DT
6043 >Typical use:</DT
6044 ><DD
6045 ><P
6046 >Prevent yet another way to track the user's steps between sessions.</P
6047 ></DD
6048 ><DT
6049 >Effect:</DT
6050 ><DD
6051 ><P
6052 >    Deletes the <SPAN
6053 CLASS="QUOTE"
6054 >"Last-Modified:"</SPAN
6055 > HTTP server header or modifies its value. 
6056    </P
6057 ></DD
6058 ><DT
6059 >Type:</DT
6060 ><DD
6061 ><P
6062 >Parameterized.</P
6063 ></DD
6064 ><DT
6065 >Parameter:</DT
6066 ><DD
6067 ><P
6068 >    One of the keywords: <SPAN
6069 CLASS="QUOTE"
6070 >"block"</SPAN
6071 >, <SPAN
6072 CLASS="QUOTE"
6073 >"reset-to-request-time"</SPAN
6074 >
6075     and <SPAN
6076 CLASS="QUOTE"
6077 >"randomize"</SPAN
6078 >
6079    </P
6080 ></DD
6081 ><DT
6082 >Notes:</DT
6083 ><DD
6084 ><P
6085 >    Removing the <SPAN
6086 CLASS="QUOTE"
6087 >"Last-Modified:"</SPAN
6088 > header is useful for filter
6089     testing, where you want to force a real reload instead of getting status
6090     code <SPAN
6091 CLASS="QUOTE"
6092 >"304"</SPAN
6093 >, which would cause the browser to reuse the old
6094     version of the page.
6095    </P
6096 ><P
6097 >    The <SPAN
6098 CLASS="QUOTE"
6099 >"randomize"</SPAN
6100 > option overwrites the value of the
6101     <SPAN
6102 CLASS="QUOTE"
6103 >"Last-Modified:"</SPAN
6104 > header with a randomly chosen time
6105     between the original value and the current time. In theory the server
6106     could send each document with a different <SPAN
6107 CLASS="QUOTE"
6108 >"Last-Modified:"</SPAN
6109 >
6110     header to track visits without using cookies. <SPAN
6111 CLASS="QUOTE"
6112 >"Randomize"</SPAN
6113 >
6114     makes it impossible and the browser can still revalidate cached documents. 
6115    </P
6116 ><P
6117 >    <SPAN
6118 CLASS="QUOTE"
6119 >"reset-to-request-time"</SPAN
6120 > overwrites the value of the
6121     <SPAN
6122 CLASS="QUOTE"
6123 >"Last-Modified:"</SPAN
6124 > header with the current time. You could use
6125     this option together with
6126     <TT
6127 CLASS="LITERAL"
6128 ><A
6129 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6130 >hided-if-modified-since</A
6131 ></TT
6132 >
6133     to further customize your random range.
6134    </P
6135 ><P
6136 >    The preferred parameter here is <SPAN
6137 CLASS="QUOTE"
6138 >"randomize"</SPAN
6139 >. It is safe
6140     to use, as long as the time settings are more or less correct.
6141     If the server sets the <SPAN
6142 CLASS="QUOTE"
6143 >"Last-Modified:"</SPAN
6144 > header to the time
6145     of the request, the random range becomes zero and the value stays the same.
6146     Therefore you should later randomize it a second time with
6147     <TT
6148 CLASS="LITERAL"
6149 ><A
6150 HREF="actions-file.html#HIDE-IF-MODIFIED-SINCE"
6151 >hided-if-modified-since</A
6152 ></TT
6153 >,
6154     just to be sure. 
6155    </P
6156 ><P
6157 >    It is also recommended to use this action together with
6158     <TT
6159 CLASS="LITERAL"
6160 ><A
6161 HREF="actions-file.html#CRUNCH-IF-NONE-MATCH"
6162 >crunch-if-none-match</A
6163 ></TT
6164 >.
6165    </P
6166 ></DD
6167 ><DT
6168 >Example usage:</DT
6169 ><DD
6170 ><P
6171 >     <TABLE
6172 BORDER="0"
6173 BGCOLOR="#E0E0E0"
6174 WIDTH="90%"
6175 ><TR
6176 ><TD
6177 ><PRE
6178 CLASS="SCREEN"
6179 ># Let the browser revalidate without being tracked across sessions
6180 { +hide-if-modified-since{-60} \
6181  +overwrite-last-modified{randomize} \
6182  +crunch-if-none-match}
6183 /</PRE
6184 ></TD
6185 ></TR
6186 ></TABLE
6187 >
6188    </P
6189 ></DD
6190 ></DL
6191 ></DIV
6192 ></DIV
6193 ><DIV
6194 CLASS="SECT3"
6195 ><H4
6196 CLASS="SECT3"
6197 ><A
6198 NAME="REDIRECT"
6199 >8.5.31. redirect</A
6200 ></H4
6201 ><P
6202 ></P
6203 ><DIV
6204 CLASS="VARIABLELIST"
6205 ><DL
6206 ><DT
6207 >Typical use:</DT
6208 ><DD
6209 ><P
6210 >    Redirect requests to other sites.
6211    </P
6212 ></DD
6213 ><DT
6214 >Effect:</DT
6215 ><DD
6216 ><P
6217 >    Convinces the browser that the requested document has been moved
6218     to another location and the browser should get it from there.
6219    </P
6220 ></DD
6221 ><DT
6222 >Type:</DT
6223 ><DD
6224 ><P
6225 >Parameterized</P
6226 ></DD
6227 ><DT
6228 >Parameter:</DT
6229 ><DD
6230 ><P
6231 >    An absolute URL or a single pcrs command.
6232    </P
6233 ></DD
6234 ><DT
6235 >Notes:</DT
6236 ><DD
6237 ><P
6238 >    Requests to which this action applies are answered with a
6239     HTTP redirect to URLs of your choosing. The new URL is
6240     either provided as parameter, or derived by applying a
6241     single pcrs command to the original URL.
6242    </P
6243 ><P
6244 >    This action will be ignored if you use it together with
6245     <TT
6246 CLASS="LITERAL"
6247 ><A
6248 HREF="actions-file.html#BLOCK"
6249 >block</A
6250 ></TT
6251 >.
6252     It can be combined with
6253     <TT
6254 CLASS="LITERAL"
6255 ><A
6256 HREF="actions-file.html#FAST-REDIRECTS"
6257 >fast-redirects{check-decoded-url}</A
6258 ></TT
6259 >
6260     to redirect to a decoded version of a rewritten URL.
6261    </P
6262 ><P
6263 >    Use this action carefully, make sure not to create redirection loops
6264     and be aware that using your own redirects might make it
6265     possible to fingerprint your requests.
6266    </P
6267 ></DD
6268 ><DT
6269 >Example usages:</DT
6270 ><DD
6271 ><P
6272 >    <TABLE
6273 BORDER="0"
6274 BGCOLOR="#E0E0E0"
6275 WIDTH="90%"
6276 ><TR
6277 ><TD
6278 ><PRE
6279 CLASS="SCREEN"
6280 ># Replace example.com's style sheet with another one
6281 { +redirect{http://localhost/css-replacements/example.com.css} }
6282  example.com/stylesheet\.css
6283
6284 # Create a short, easy to remember nickname for a favorite site
6285 # (relies on the browser accept and forward invalid URLs to <SPAN
6286 CLASS="APPLICATION"
6287 >Privoxy</SPAN
6288 >)
6289 { +redirect{http://www.privoxy.org/user-manual/actions-file.html} }
6290  a
6291
6292 # Always use the expanded view for Undeadly.org articles
6293 # (Note the $ at the end of the URL pattern to make sure
6294 # the request for the rewritten URL isn't redirected as well)
6295 {+redirect{s@$@&#38;mode=expanded@}}
6296 undeadly.org/cgi\?action=article&#38;sid=\d*$</PRE
6297 ></TD
6298 ></TR
6299 ></TABLE
6300 >
6301    </P
6302 ></DD
6303 ></DL
6304 ></DIV
6305 ></DIV
6306 ><DIV
6307 CLASS="SECT3"
6308 ><H4
6309 CLASS="SECT3"
6310 ><A
6311 NAME="SEND-VANILLA-WAFER"
6312 >8.5.32. send-vanilla-wafer</A
6313 ></H4
6314 ><P
6315 ></P
6316 ><DIV
6317 CLASS="VARIABLELIST"
6318 ><DL
6319 ><DT
6320 >Typical use:</DT
6321 ><DD
6322 ><P
6323 >    Feed log analysis scripts with useless data.
6324    </P
6325 ></DD
6326 ><DT
6327 >Effect:</DT
6328 ><DD
6329 ><P
6330 >    Sends a cookie with each request stating that you do not accept any copyright
6331     on cookies sent to you, and asking the site operator not to track you.
6332    </P
6333 ></DD
6334 ><DT
6335 >Type:</DT
6336 ><DD
6337 ><P
6338 >Boolean.</P
6339 ></DD
6340 ><DT
6341 >Parameter:</DT
6342 ><DD
6343 ><P
6344 >    N/A
6345    </P
6346 ></DD
6347 ><DT
6348 >Notes:</DT
6349 ><DD
6350 ><P
6351 >    The vanilla wafer is a (relatively) unique header and could conceivably be used to track you.
6352    </P
6353 ><P
6354 >    This action is rarely used and not enabled in the default configuration.
6355    </P
6356 ></DD
6357 ><DT
6358 >Example usage:</DT
6359 ><DD
6360 ><P
6361 >     <TABLE
6362 BORDER="0"
6363 BGCOLOR="#E0E0E0"
6364 WIDTH="90%"
6365 ><TR
6366 ><TD
6367 ><PRE
6368 CLASS="SCREEN"
6369 >+send-vanilla-wafer</PRE
6370 ></TD
6371 ></TR
6372 ></TABLE
6373 >
6374    </P
6375 ></DD
6376 ></DL
6377 ></DIV
6378 ></DIV
6379 ><DIV
6380 CLASS="SECT3"
6381 ><H4
6382 CLASS="SECT3"
6383 ><A
6384 NAME="SEND-WAFER"
6385 >8.5.33. send-wafer</A
6386 ></H4
6387 ><P
6388 ></P
6389 ><DIV
6390 CLASS="VARIABLELIST"
6391 ><DL
6392 ><DT
6393 >Typical use:</DT
6394 ><DD
6395 ><P
6396 >    Send custom cookies or feed log analysis scripts with even more useless data.
6397    </P
6398 ></DD
6399 ><DT
6400 >Effect:</DT
6401 ><DD
6402 ><P
6403 >    Sends a custom, user-defined cookie with each request.
6404    </P
6405 ></DD
6406 ><DT
6407 >Type:</DT
6408 ><DD
6409 ><P
6410 >Multi-value.</P
6411 ></DD
6412 ><DT
6413 >Parameter:</DT
6414 ><DD
6415 ><P
6416 >    A string of the form <SPAN
6417 CLASS="QUOTE"
6418 >"<TT
6419 CLASS="REPLACEABLE"
6420 ><I
6421 >name</I
6422 ></TT
6423 >=<TT
6424 CLASS="REPLACEABLE"
6425 ><I
6426 >value</I
6427 ></TT
6428 >"</SPAN
6429 >.
6430    </P
6431 ></DD
6432 ><DT
6433 >Notes:</DT
6434 ><DD
6435 ><P
6436 >    Being multi-valued, multiple instances of this action can apply to the same request,
6437     resulting in multiple cookies being sent.
6438    </P
6439 ><P
6440 >    This action is rarely used and not enabled in the default configuration.
6441    </P
6442 ></DD
6443 ><DT
6444 >Example usage (section):</DT
6445 ><DD
6446 ><P
6447 >    <TABLE
6448 BORDER="0"
6449 BGCOLOR="#E0E0E0"
6450 WIDTH="90%"
6451 ><TR
6452 ><TD
6453 ><PRE
6454 CLASS="SCREEN"
6455 >{+send-wafer{UsingPrivoxy=true}}
6456 my-internal-testing-server.void</PRE
6457 ></TD
6458 ></TR
6459 ></TABLE
6460 >
6461    </P
6462 ></DD
6463 ></DL
6464 ></DIV
6465 ></DIV
6466 ><DIV
6467 CLASS="SECT3"
6468 ><H4
6469 CLASS="SECT3"
6470 ><A
6471 NAME="SERVER-HEADER-FILTER"
6472 >8.5.34. server-header-filter</A
6473 ></H4
6474 ><P
6475 ></P
6476 ><DIV
6477 CLASS="VARIABLELIST"
6478 ><DL
6479 ><DT
6480 >Typical use:</DT
6481 ><DD
6482 ><P
6483 >   Rewrite or remove single server headers.
6484    </P
6485 ></DD
6486 ><DT
6487 >Effect:</DT
6488 ><DD
6489 ><P
6490 >    All server headers to which this action applies are filtered on-the-fly
6491     through the specified regular expression based substitutions.
6492    </P
6493 ></DD
6494 ><DT
6495 >Type:</DT
6496 ><DD
6497 ><P
6498 >Parameterized.</P
6499 ></DD
6500 ><DT
6501 >Parameter:</DT
6502 ><DD
6503 ><P
6504 >    The name of a server-header filter, as defined in one of the
6505     <A
6506 HREF="filter-file.html"
6507 >filter files</A
6508 >.
6509    </P
6510 ></DD
6511 ><DT
6512 >Notes:</DT
6513 ><DD
6514 ><P
6515 >    Server-header filters are applied to each header on its own, not to
6516     all at once. This makes it easier to diagnose problems, but on the downside
6517     you can't write filters that only change header x if header y's value is z.
6518     You can do that by using tags though.
6519    </P
6520 ><P
6521 >    Server-header filters are executed after the other header actions have finished
6522     and use their output as input.
6523    </P
6524 ><P
6525 >    Please refer to the <A
6526 HREF="filter-file.html"
6527 >filter file chapter</A
6528 >
6529     to learn which server-header filters are available by default, and how to
6530     create your own.
6531    </P
6532 ></DD
6533 ><DT
6534 >Example usage (section):</DT
6535 ><DD
6536 ><P
6537 >     <TABLE
6538 BORDER="0"
6539 BGCOLOR="#E0E0E0"
6540 WIDTH="90%"
6541 ><TR
6542 ><TD
6543 ><PRE
6544 CLASS="SCREEN"
6545 >{+server-header-filter{html-to-xml}}
6546 example.org/xml-instance-that-is-delivered-as-html
6547
6548 {+server-header-filter{xml-to-html}}
6549 example.org/instance-that-is-delivered-as-xml-but-is-not
6550     </PRE
6551 ></TD
6552 ></TR
6553 ></TABLE
6554 >
6555     </P
6556 ></DD
6557 ></DL
6558 ></DIV
6559 ></DIV
6560 ><DIV
6561 CLASS="SECT3"
6562 ><H4
6563 CLASS="SECT3"
6564 ><A
6565 NAME="SERVER-HEADER-TAGGER"
6566 >8.5.35. server-header-tagger</A
6567 ></H4
6568 ><P
6569 ></P
6570 ><DIV
6571 CLASS="VARIABLELIST"
6572 ><DL
6573 ><DT
6574 >Typical use:</DT
6575 ><DD
6576 ><P
6577 >   Enable or disable filters based on the Content-Type header.
6578    </P
6579 ></DD
6580 ><DT
6581 >Effect:</DT
6582 ><DD
6583 ><P
6584 >    Server headers to which this action applies are filtered on-the-fly through
6585     the specified regular expression based substitutions, the result is used as
6586     tag.
6587    </P
6588 ></DD
6589 ><DT
6590 >Type:</DT
6591 ><DD
6592 ><P
6593 >Parameterized.</P
6594 ></DD
6595 ><DT
6596 >Parameter:</DT
6597 ><DD
6598 ><P
6599 >    The name of a server-header tagger, as defined in one of the
6600     <A
6601 HREF="filter-file.html"
6602 >filter files</A
6603 >.
6604    </P
6605 ></DD
6606 ><DT
6607 >Notes:</DT
6608 ><DD
6609 ><P
6610 >    Server-header taggers are applied to each header on its own,
6611     and as the header isn't modified, each tagger <SPAN
6612 CLASS="QUOTE"
6613 >"sees"</SPAN
6614 >
6615     the original.
6616    </P
6617 ><P
6618 >    Server-header taggers are executed before all other header actions
6619     that modify server headers. Their tags can be used to control
6620     all of the other server-header actions, the content filters
6621     and the crunch actions (<A
6622 HREF="actions-file.html#REDIRECT"
6623 >redirect</A
6624 >
6625     and <A
6626 HREF="actions-file.html#BLOCK"
6627 >block</A
6628 >).
6629    </P
6630 ><P
6631 >    Obviously crunching based on tags created by server-header taggers
6632     doesn't prevent the request from showing up in the server's log file.
6633    </P
6634 ></DD
6635 ><DT
6636 >Example usage (section):</DT
6637 ><DD
6638 ><P
6639 >     <TABLE
6640 BORDER="0"
6641 BGCOLOR="#E0E0E0"
6642 WIDTH="90%"
6643 ><TR
6644 ><TD
6645 ><PRE
6646 CLASS="SCREEN"
6647 ># Tag every request with the content type declared by the server
6648 {+server-header-tagger{content-type}}
6649 /
6650     </PRE
6651 ></TD
6652 ></TR
6653 ></TABLE
6654 >
6655     </P
6656 ></DD
6657 ></DL
6658 ></DIV
6659 ></DIV
6660 ><DIV
6661 CLASS="SECT3"
6662 ><H4
6663 CLASS="SECT3"
6664 ><A
6665 NAME="SESSION-COOKIES-ONLY"
6666 >8.5.36. session-cookies-only</A
6667 ></H4
6668 ><P
6669 ></P
6670 ><DIV
6671 CLASS="VARIABLELIST"
6672 ><DL
6673 ><DT
6674 >Typical use:</DT
6675 ><DD
6676 ><P
6677 >    Allow only temporary <SPAN
6678 CLASS="QUOTE"
6679 >"session"</SPAN
6680 > cookies (for the current
6681     browser session <SPAN
6682 CLASS="emphasis"
6683 ><I
6684 CLASS="EMPHASIS"
6685 >only</I
6686 ></SPAN
6687 >). 
6688    </P
6689 ></DD
6690 ><DT
6691 >Effect:</DT
6692 ><DD
6693 ><P
6694 >    Deletes the <SPAN
6695 CLASS="QUOTE"
6696 >"expires"</SPAN
6697 > field from <SPAN
6698 CLASS="QUOTE"
6699 >"Set-Cookie:"</SPAN
6700 >
6701     server headers. Most browsers will not store such cookies permanently and
6702     forget them in between sessions.
6703    </P
6704 ></DD
6705 ><DT
6706 >Type:</DT
6707 ><DD
6708 ><P
6709 >Boolean.</P
6710 ></DD
6711 ><DT
6712 >Parameter:</DT
6713 ><DD
6714 ><P
6715 >    N/A
6716    </P
6717 ></DD
6718 ><DT
6719 >Notes:</DT
6720 ><DD
6721 ><P
6722 >    This is less strict than <TT
6723 CLASS="LITERAL"
6724 ><A
6725 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6726 >crunch-incoming-cookies</A
6727 ></TT
6728 > / 
6729     <TT
6730 CLASS="LITERAL"
6731 ><A
6732 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6733 >crunch-outgoing-cookies</A
6734 ></TT
6735 > and allows you to browse
6736     websites that insist or rely on setting cookies, without compromising your privacy too badly.
6737    </P
6738 ><P
6739 >    Most browsers will not permanently store cookies that have been processed by
6740     <TT
6741 CLASS="LITERAL"
6742 >session-cookies-only</TT
6743 > and will forget about them between sessions.
6744     This makes profiling cookies useless, but won't break sites which require cookies so
6745     that you can log in for transactions. This is generally turned on for all 
6746     sites, and is the recommended setting.
6747    </P
6748 ><P
6749 >    It makes <SPAN
6750 CLASS="emphasis"
6751 ><I
6752 CLASS="EMPHASIS"
6753 >no sense at all</I
6754 ></SPAN
6755 > to use <TT
6756 CLASS="LITERAL"
6757 >session-cookies-only</TT
6758 >
6759     together with <TT
6760 CLASS="LITERAL"
6761 ><A
6762 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
6763 >crunch-incoming-cookies</A
6764 ></TT
6765 > or
6766     <TT
6767 CLASS="LITERAL"
6768 ><A
6769 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
6770 >crunch-outgoing-cookies</A
6771 ></TT
6772 >. If you do, cookies
6773     will be plainly killed.
6774    </P
6775 ><P
6776 >    Note that it is up to the browser how it handles such cookies without an <SPAN
6777 CLASS="QUOTE"
6778 >"expires"</SPAN
6779 >
6780     field. If you use an exotic browser, you might want to try it out to be sure.
6781    </P
6782 ><P
6783 >    This setting also has no effect on cookies that may have been stored
6784     previously by the browser before starting <SPAN
6785 CLASS="APPLICATION"
6786 >Privoxy</SPAN
6787 >.
6788     These would have to be removed manually.
6789    </P
6790 ><P
6791 >     <SPAN
6792 CLASS="APPLICATION"
6793 >Privoxy</SPAN
6794 > also uses  
6795      the <A
6796 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
6797 >content-cookies filter</A
6798
6799      to block some types of cookies. Content cookies are not effected by 
6800      <TT
6801 CLASS="LITERAL"
6802 >session-cookies-only</TT
6803 >.
6804    </P
6805 ></DD
6806 ><DT
6807 >Example usage:</DT
6808 ><DD
6809 ><P
6810 >     <TABLE
6811 BORDER="0"
6812 BGCOLOR="#E0E0E0"
6813 WIDTH="90%"
6814 ><TR
6815 ><TD
6816 ><PRE
6817 CLASS="SCREEN"
6818 >+session-cookies-only</PRE
6819 ></TD
6820 ></TR
6821 ></TABLE
6822 >
6823    </P
6824 ></DD
6825 ></DL
6826 ></DIV
6827 ></DIV
6828 ><DIV
6829 CLASS="SECT3"
6830 ><H4
6831 CLASS="SECT3"
6832 ><A
6833 NAME="SET-IMAGE-BLOCKER"
6834 >8.5.37. set-image-blocker</A
6835 ></H4
6836 ><P
6837 ></P
6838 ><DIV
6839 CLASS="VARIABLELIST"
6840 ><DL
6841 ><DT
6842 >Typical use:</DT
6843 ><DD
6844 ><P
6845 >Choose the replacement for blocked images</P
6846 ></DD
6847 ><DT
6848 >Effect:</DT
6849 ><DD
6850 ><P
6851 >     This action alone doesn't do anything noticeable. If <SPAN
6852 CLASS="emphasis"
6853 ><I
6854 CLASS="EMPHASIS"
6855 >both</I
6856 ></SPAN
6857 >
6858      <TT
6859 CLASS="LITERAL"
6860 ><A
6861 HREF="actions-file.html#BLOCK"
6862 >block</A
6863 ></TT
6864 > <SPAN
6865 CLASS="emphasis"
6866 ><I
6867 CLASS="EMPHASIS"
6868 >and</I
6869 ></SPAN
6870 > <TT
6871 CLASS="LITERAL"
6872 ><A
6873 HREF="actions-file.html#HANDLE-AS-IMAGE"
6874 >handle-as-image</A
6875 ></TT
6876 > <SPAN
6877 CLASS="emphasis"
6878 ><I
6879 CLASS="EMPHASIS"
6880 >also</I
6881 ></SPAN
6882 >
6883      apply, i.e. if the request is to be blocked as an image,
6884      <SPAN
6885 CLASS="emphasis"
6886 ><I
6887 CLASS="EMPHASIS"
6888 >then</I
6889 ></SPAN
6890 > the parameter of this action decides what will be
6891      sent as a replacement.
6892    </P
6893 ></DD
6894 ><DT
6895 >Type:</DT
6896 ><DD
6897 ><P
6898 >Parameterized.</P
6899 ></DD
6900 ><DT
6901 >Parameter:</DT
6902 ><DD
6903 ><P
6904 ></P
6905 ><UL
6906 ><LI
6907 ><P
6908 >      <SPAN
6909 CLASS="QUOTE"
6910 >"pattern"</SPAN
6911 > to send a built-in checkerboard pattern image. The image is visually
6912       decent, scales very well, and makes it obvious where banners were busted.
6913      </P
6914 ></LI
6915 ><LI
6916 ><P
6917 >      <SPAN
6918 CLASS="QUOTE"
6919 >"blank"</SPAN
6920 > to send a built-in transparent image. This makes banners disappear
6921       completely, but makes it hard to detect where <SPAN
6922 CLASS="APPLICATION"
6923 >Privoxy</SPAN
6924 > has blocked
6925       images on a given page and complicates troubleshooting if <SPAN
6926 CLASS="APPLICATION"
6927 >Privoxy</SPAN
6928 >
6929       has blocked innocent images, like navigation icons.
6930      </P
6931 ></LI
6932 ><LI
6933 ><P
6934 >      <SPAN
6935 CLASS="QUOTE"
6936 >"<TT
6937 CLASS="REPLACEABLE"
6938 ><I
6939 >target-url</I
6940 ></TT
6941 >"</SPAN
6942 > to
6943       send a redirect to <TT
6944 CLASS="REPLACEABLE"
6945 ><I
6946 >target-url</I
6947 ></TT
6948 >. You can redirect
6949       to any image anywhere, even in your local filesystem via <SPAN
6950 CLASS="QUOTE"
6951 >"file:///"</SPAN
6952 > URL. 
6953       (But note that not all browsers support redirecting to a local file system).
6954      </P
6955 ><P
6956 >      A good application of redirects is to use special <SPAN
6957 CLASS="APPLICATION"
6958 >Privoxy</SPAN
6959 >-built-in
6960       URLs, which send the built-in images, as <TT
6961 CLASS="REPLACEABLE"
6962 ><I
6963 >target-url</I
6964 ></TT
6965 >.
6966       This has the same visual effect as specifying <SPAN
6967 CLASS="QUOTE"
6968 >"blank"</SPAN
6969 > or <SPAN
6970 CLASS="QUOTE"
6971 >"pattern"</SPAN
6972 > in
6973       the first place, but enables your browser to cache the replacement image, instead of requesting
6974       it over and over again.
6975      </P
6976 ></LI
6977 ></UL
6978 ></DD
6979 ><DT
6980 >Notes:</DT
6981 ><DD
6982 ><P
6983 >    The URLs for the built-in images are <SPAN
6984 CLASS="QUOTE"
6985 >"http://config.privoxy.org/send-banner?type=<TT
6986 CLASS="REPLACEABLE"
6987 ><I
6988 >type</I
6989 ></TT
6990 >"</SPAN
6991 >, where <TT
6992 CLASS="REPLACEABLE"
6993 ><I
6994 >type</I
6995 ></TT
6996 > is
6997     either <SPAN
6998 CLASS="QUOTE"
6999 >"blank"</SPAN
7000 > or <SPAN
7001 CLASS="QUOTE"
7002 >"pattern"</SPAN
7003 >.
7004    </P
7005 ><P
7006 >    There is a third (advanced) type, called <SPAN
7007 CLASS="QUOTE"
7008 >"auto"</SPAN
7009 >. It is <SPAN
7010 CLASS="emphasis"
7011 ><I
7012 CLASS="EMPHASIS"
7013 >NOT</I
7014 ></SPAN
7015 > to be
7016     used in <TT
7017 CLASS="LITERAL"
7018 >set-image-blocker</TT
7019 >, but meant for use from <A
7020 HREF="filter-file.html"
7021 >filters</A
7022 >.
7023     Auto will select the type of image that would have applied to the referring page, had it been an image.
7024    </P
7025 ></DD
7026 ><DT
7027 >Example usage:</DT
7028 ><DD
7029 ><P
7030 >    Built-in pattern:
7031    </P
7032 ><P
7033 >    <TABLE
7034 BORDER="0"
7035 BGCOLOR="#E0E0E0"
7036 WIDTH="90%"
7037 ><TR
7038 ><TD
7039 ><PRE
7040 CLASS="SCREEN"
7041 >+set-image-blocker{pattern}</PRE
7042 ></TD
7043 ></TR
7044 ></TABLE
7045 >
7046    </P
7047 ><P
7048 >    Redirect to the BSD daemon:
7049    </P
7050 ><P
7051 >    <TABLE
7052 BORDER="0"
7053 BGCOLOR="#E0E0E0"
7054 WIDTH="90%"
7055 ><TR
7056 ><TD
7057 ><PRE
7058 CLASS="SCREEN"
7059 >+set-image-blocker{http://www.freebsd.org/gifs/dae_up3.gif}</PRE
7060 ></TD
7061 ></TR
7062 ></TABLE
7063 >
7064    </P
7065 ><P
7066 >    Redirect to the built-in pattern for better caching:
7067    </P
7068 ><P
7069 >    <TABLE
7070 BORDER="0"
7071 BGCOLOR="#E0E0E0"
7072 WIDTH="90%"
7073 ><TR
7074 ><TD
7075 ><PRE
7076 CLASS="SCREEN"
7077 >+set-image-blocker{http://config.privoxy.org/send-banner?type=pattern}</PRE
7078 ></TD
7079 ></TR
7080 ></TABLE
7081 >
7082    </P
7083 ></DD
7084 ></DL
7085 ></DIV
7086 ></DIV
7087 ><DIV
7088 CLASS="SECT3"
7089 ><H4
7090 CLASS="SECT3"
7091 ><A
7092 NAME="TREAT-FORBIDDEN-CONNECTS-LIKE-BLOCKS"
7093 >8.5.38. treat-forbidden-connects-like-blocks</A
7094 ></H4
7095 ><P
7096 ></P
7097 ><DIV
7098 CLASS="VARIABLELIST"
7099 ><DL
7100 ><DT
7101 >Typical use:</DT
7102 ><DD
7103 ><P
7104 >Block forbidden connects with an easy to find error message.</P
7105 ></DD
7106 ><DT
7107 >Effect:</DT
7108 ><DD
7109 ><P
7110 >    If this action is enabled, <SPAN
7111 CLASS="APPLICATION"
7112 >Privoxy</SPAN
7113 > no longer
7114     makes a difference between forbidden connects and ordinary blocks. 
7115    </P
7116 ></DD
7117 ><DT
7118 >Type:</DT
7119 ><DD
7120 ><P
7121 >Boolean</P
7122 ></DD
7123 ><DT
7124 >Parameter:</DT
7125 ><DD
7126 ><P
7127 >N/A</P
7128 ></DD
7129 ><DT
7130 >Notes:</DT
7131 ><DD
7132 ><P
7133 >    By default <SPAN
7134 CLASS="APPLICATION"
7135 >Privoxy</SPAN
7136 > answers
7137     <A
7138 HREF="actions-file.html#LIMIT-CONNECT"
7139 >forbidden <SPAN
7140 CLASS="QUOTE"
7141 >"Connect"</SPAN
7142 > requests</A
7143 >
7144     with a short error message inside the headers. If the browser doesn't display
7145     headers (most don't), you just see an empty page.
7146    </P
7147 ><P
7148 >    With this action enabled, <SPAN
7149 CLASS="APPLICATION"
7150 >Privoxy</SPAN
7151 > displays
7152     the message that is used for ordinary blocks instead. If you decide
7153     to make an exception for the page in question, you can do so by
7154     following the <SPAN
7155 CLASS="QUOTE"
7156 >"See why"</SPAN
7157 > link.
7158    </P
7159 ><P
7160 >    For <SPAN
7161 CLASS="QUOTE"
7162 >"Connect"</SPAN
7163 > requests the clients tell
7164     <SPAN
7165 CLASS="APPLICATION"
7166 >Privoxy</SPAN
7167 > which host they are interested
7168     in, but not which document they plan to get later. As a result, the
7169     <SPAN
7170 CLASS="QUOTE"
7171 >"Go there anyway"</SPAN
7172 > wouldn't work and is therefore suppressed.
7173    </P
7174 ></DD
7175 ><DT
7176 >Example usage:</DT
7177 ><DD
7178 ><P
7179 >    <TABLE
7180 BORDER="0"
7181 BGCOLOR="#E0E0E0"
7182 WIDTH="90%"
7183 ><TR
7184 ><TD
7185 ><PRE
7186 CLASS="SCREEN"
7187 >+treat-forbidden-connects-like-blocks</PRE
7188 ></TD
7189 ></TR
7190 ></TABLE
7191 >
7192    </P
7193 ></DD
7194 ></DL
7195 ></DIV
7196 ></DIV
7197 ><DIV
7198 CLASS="SECT3"
7199 ><H3
7200 CLASS="SECT3"
7201 ><A
7202 NAME="AEN4261"
7203 >8.5.39. Summary</A
7204 ></H3
7205 ><P
7206 > Note that many of these actions have the potential to cause a page to
7207  misbehave, possibly even not to display at all. There are many ways 
7208  a site designer may choose to design his site, and what HTTP header 
7209  content, and other criteria, he may depend on. There is no way to have hard
7210  and fast rules for all sites. See the <A
7211 HREF="appendix.html#ACTIONSANAT"
7212 >Appendix</A
7213 > for a brief example on troubleshooting
7214  actions.</P
7215 ></DIV
7216 ></DIV
7217 ><DIV
7218 CLASS="SECT2"
7219 ><H2
7220 CLASS="SECT2"
7221 ><A
7222 NAME="ALIASES"
7223 >8.6. Aliases</A
7224 ></H2
7225 ><P
7226 > Custom <SPAN
7227 CLASS="QUOTE"
7228 >"actions"</SPAN
7229 >, known to <SPAN
7230 CLASS="APPLICATION"
7231 >Privoxy</SPAN
7232 >
7233  as <SPAN
7234 CLASS="QUOTE"
7235 >"aliases"</SPAN
7236 >, can be defined by combining other actions.
7237  These can in turn be invoked just like the built-in actions.
7238  Currently, an alias name can contain any character except space, tab,
7239  <SPAN
7240 CLASS="QUOTE"
7241 >"="</SPAN
7242 >,
7243  <SPAN
7244 CLASS="QUOTE"
7245 >"{"</SPAN
7246 > and <SPAN
7247 CLASS="QUOTE"
7248 >"}"</SPAN
7249 >, but we <SPAN
7250 CLASS="emphasis"
7251 ><I
7252 CLASS="EMPHASIS"
7253 >strongly 
7254  recommend</I
7255 ></SPAN
7256 > that you only use <SPAN
7257 CLASS="QUOTE"
7258 >"a"</SPAN
7259 > to <SPAN
7260 CLASS="QUOTE"
7261 >"z"</SPAN
7262 >,
7263  <SPAN
7264 CLASS="QUOTE"
7265 >"0"</SPAN
7266 > to <SPAN
7267 CLASS="QUOTE"
7268 >"9"</SPAN
7269 >, <SPAN
7270 CLASS="QUOTE"
7271 >"+"</SPAN
7272 >, and <SPAN
7273 CLASS="QUOTE"
7274 >"-"</SPAN
7275 >.
7276  Alias names are not case sensitive, and are not required to start with a
7277  <SPAN
7278 CLASS="QUOTE"
7279 >"+"</SPAN
7280 > or <SPAN
7281 CLASS="QUOTE"
7282 >"-"</SPAN
7283 > sign, since they are merely textually
7284  expanded.</P
7285 ><P
7286 > Aliases can be used throughout the actions file, but they <SPAN
7287 CLASS="emphasis"
7288 ><I
7289 CLASS="EMPHASIS"
7290 >must be
7291  defined in a special section at the top of the file!</I
7292 ></SPAN
7293 >
7294  And there can only be one such section per actions file. Each actions file may
7295  have its own alias section, and the aliases defined in it are only visible
7296  within that file.</P
7297 ><P
7298 > There are two main reasons to use aliases: One is to save typing for frequently
7299  used combinations of actions, the other one is a gain in flexibility: If you
7300  decide once how you want to handle shops by defining an alias called
7301  <SPAN
7302 CLASS="QUOTE"
7303 >"shop"</SPAN
7304 >, you can later change your policy on shops in
7305  <SPAN
7306 CLASS="emphasis"
7307 ><I
7308 CLASS="EMPHASIS"
7309 >one</I
7310 ></SPAN
7311 > place, and your changes will take effect everywhere
7312  in the actions file where the <SPAN
7313 CLASS="QUOTE"
7314 >"shop"</SPAN
7315 > alias is used. Calling aliases
7316  by their purpose also makes your actions files more readable.</P
7317 ><P
7318 > Currently, there is one big drawback to using aliases, though:
7319  <SPAN
7320 CLASS="APPLICATION"
7321 >Privoxy</SPAN
7322 >'s built-in web-based action file
7323  editor honors aliases when reading the actions files, but it expands
7324  them before writing. So the effects of your aliases are of course preserved,
7325  but the aliases themselves are lost when you edit sections that use aliases
7326  with it.</P
7327 ><P
7328 > Now let's define some aliases...</P
7329 ><P
7330 > <TABLE
7331 BORDER="0"
7332 BGCOLOR="#E0E0E0"
7333 WIDTH="100%"
7334 ><TR
7335 ><TD
7336 ><PRE
7337 CLASS="SCREEN"
7338 > # Useful custom aliases we can use later.
7339  #
7340  # Note the (required!) section header line and that this section
7341  # must be at the top of the actions file!
7342  #
7343  {{alias}}
7344
7345  # These aliases just save typing later:
7346  # (Note that some already use other aliases!)
7347  #
7348  +crunch-all-cookies = +<A
7349 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7350 >crunch-incoming-cookies</A
7351 > +<A
7352 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7353 >crunch-outgoing-cookies</A
7354 >
7355  -crunch-all-cookies = -<A
7356 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7357 >crunch-incoming-cookies</A
7358 > -<A
7359 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7360 >crunch-outgoing-cookies</A
7361 >
7362  +block-as-image      = +block +handle-as-image
7363  allow-all-cookies   = -crunch-all-cookies -<A
7364 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7365 >session-cookies-only</A
7366 > -<A
7367 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7368 >filter{content-cookies}</A
7369 >
7370
7371  # These aliases define combinations of actions
7372  # that are useful for certain types of sites:
7373  #
7374  fragile     = -<A
7375 HREF="actions-file.html#BLOCK"
7376 >block</A
7377 > -<A
7378 HREF="actions-file.html#FILTER"
7379 >filter</A
7380 > -crunch-all-cookies -<A
7381 HREF="actions-file.html#FAST-REDIRECTS"
7382 >fast-redirects</A
7383 > -<A
7384 HREF="actions-file.html#HIDE-REFERER"
7385 >hide-referrer</A
7386 > -<A
7387 HREF="actions-file.html#KILL-POPUPS"
7388 >kill-popups</A
7389 > -<A
7390 HREF="actions-file.html#PREVENT-COMPRESSION"
7391 >prevent-compression</A
7392 >
7393
7394  shop        = -crunch-all-cookies -<A
7395 HREF="actions-file.html#FILTER-ALL-POPUPS"
7396 >filter{all-popups}</A
7397 > -<A
7398 HREF="actions-file.html#KILL-POPUPS"
7399 >kill-popups</A
7400 >
7401
7402  # Short names for other aliases, for really lazy people ;-)
7403  #
7404  c0 = +crunch-all-cookies
7405  c1 = -crunch-all-cookies</PRE
7406 ></TD
7407 ></TR
7408 ></TABLE
7409 ></P
7410 ><P
7411 > ...and put them to use. These sections would appear in the lower part of an 
7412  actions file and define exceptions to the default actions (as specified further
7413  up for the <SPAN
7414 CLASS="QUOTE"
7415 >"/"</SPAN
7416 > pattern):</P
7417 ><P
7418 > <TABLE
7419 BORDER="0"
7420 BGCOLOR="#E0E0E0"
7421 WIDTH="100%"
7422 ><TR
7423 ><TD
7424 ><PRE
7425 CLASS="SCREEN"
7426 > # These sites are either very complex or very keen on
7427  # user data and require minimal interference to work:
7428  #
7429  {fragile}
7430  .office.microsoft.com
7431  .windowsupdate.microsoft.com
7432  # Gmail is really mail.google.com, not gmail.com
7433  mail.google.com
7434
7435  # Shopping sites:
7436  # Allow cookies (for setting and retrieving your customer data)
7437  #           
7438  {shop}
7439  .quietpc.com
7440  .worldpay.com   # for quietpc.com
7441  mybank.example.com
7442
7443  # These shops require pop-ups:
7444  #
7445  {-kill-popups -filter{all-popups} -filter{unsolicited-popups}}
7446   .dabs.com
7447   .overclockers.co.uk</PRE
7448 ></TD
7449 ></TR
7450 ></TABLE
7451 ></P
7452 ><P
7453 > Aliases like <SPAN
7454 CLASS="QUOTE"
7455 >"shop"</SPAN
7456 > and <SPAN
7457 CLASS="QUOTE"
7458 >"fragile"</SPAN
7459 > are typically used for 
7460  <SPAN
7461 CLASS="QUOTE"
7462 >"problem"</SPAN
7463 > sites that require more than one action to be disabled 
7464  in order to function properly.</P
7465 ></DIV
7466 ><DIV
7467 CLASS="SECT2"
7468 ><H2
7469 CLASS="SECT2"
7470 ><A
7471 NAME="ACT-EXAMPLES"
7472 >8.7. Actions Files Tutorial</A
7473 ></H2
7474 ><P
7475 > The above chapters have shown <A
7476 HREF="actions-file.html"
7477 >which actions files
7478  there are and how they are organized</A
7479 >, how actions are <A
7480 HREF="actions-file.html#ACTIONS"
7481 >specified</A
7482 > and <A
7483 HREF="actions-file.html#ACTIONS-APPLY"
7484 >applied
7485  to URLs</A
7486 >, how <A
7487 HREF="actions-file.html#AF-PATTERNS"
7488 >patterns</A
7489 > work, and how to
7490  define and use <A
7491 HREF="actions-file.html#ALIASES"
7492 >aliases</A
7493 >. Now, let's look at an
7494  example <TT
7495 CLASS="FILENAME"
7496 >default.action</TT
7497 > and <TT
7498 CLASS="FILENAME"
7499 >user.action</TT
7500 >
7501  file and see how all these pieces come together:</P
7502 ><DIV
7503 CLASS="SECT3"
7504 ><H3
7505 CLASS="SECT3"
7506 ><A
7507 NAME="AEN4326"
7508 >8.7.1. default.action</A
7509 ></H3
7510 ><P
7511 >Every config file should start with a short comment stating its purpose:</P
7512 ><P
7513 > <TABLE
7514 BORDER="0"
7515 BGCOLOR="#E0E0E0"
7516 WIDTH="100%"
7517 ><TR
7518 ><TD
7519 ><PRE
7520 CLASS="SCREEN"
7521 ># Sample default.action file &#60;ijbswa-developers@lists.sourceforge.net&#62;</PRE
7522 ></TD
7523 ></TR
7524 ></TABLE
7525 ></P
7526 ><P
7527 >Then, since this is the <TT
7528 CLASS="FILENAME"
7529 >default.action</TT
7530 > file, the
7531 first section is a special section for internal use that you needn't
7532 change or worry about:</P
7533 ><P
7534 > <TABLE
7535 BORDER="0"
7536 BGCOLOR="#E0E0E0"
7537 WIDTH="100%"
7538 ><TR
7539 ><TD
7540 ><PRE
7541 CLASS="SCREEN"
7542 >##########################################################################
7543 # Settings -- Don't change! For internal Privoxy use ONLY.
7544 ##########################################################################
7545
7546 {{settings}}
7547 for-privoxy-version=3.0</PRE
7548 ></TD
7549 ></TR
7550 ></TABLE
7551 ></P
7552 ><P
7553 >After that comes the (optional) alias section. We'll use the example
7554 section from the above <A
7555 HREF="actions-file.html#ALIASES"
7556 >chapter on aliases</A
7557 >,
7558 that also explains why and how aliases are used:</P
7559 ><P
7560 > <TABLE
7561 BORDER="0"
7562 BGCOLOR="#E0E0E0"
7563 WIDTH="100%"
7564 ><TR
7565 ><TD
7566 ><PRE
7567 CLASS="SCREEN"
7568 >##########################################################################
7569 # Aliases
7570 ##########################################################################
7571 {{alias}}
7572
7573  # These aliases just save typing later:
7574  # (Note that some already use other aliases!)
7575  #
7576  +crunch-all-cookies = +<A
7577 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7578 >crunch-incoming-cookies</A
7579 > +<A
7580 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7581 >crunch-outgoing-cookies</A
7582 >
7583  -crunch-all-cookies = -<A
7584 HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
7585 >crunch-incoming-cookies</A
7586 > -<A
7587 HREF="actions-file.html#CRUNCH-OUTGOING-COOKIES"
7588 >crunch-outgoing-cookies</A
7589 >
7590  +block-as-image      = +block +handle-as-image
7591  mercy-for-cookies   = -crunch-all-cookies -<A
7592 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7593 >session-cookies-only</A
7594 > -<A
7595 HREF="actions-file.html#FILTER-CONTENT-COOKIES"
7596 >filter{content-cookies}</A
7597 >
7598
7599  # These aliases define combinations of actions
7600  # that are useful for certain types of sites:
7601  #
7602  fragile     = -<A
7603 HREF="actions-file.html#BLOCK"
7604 >block</A
7605 > -<A
7606 HREF="actions-file.html#FILTER"
7607 >filter</A
7608 > -crunch-all-cookies -<A
7609 HREF="actions-file.html#FAST-REDIRECTS"
7610 >fast-redirects</A
7611 > -<A
7612 HREF="actions-file.html#HIDE-REFERER"
7613 >hide-referrer</A
7614 > -<A
7615 HREF="actions-file.html#KILL-POPUPS"
7616 >kill-popups</A
7617 >
7618  shop        = -crunch-all-cookies -<A
7619 HREF="actions-file.html#FILTER-ALL-POPUPS"
7620 >filter{all-popups}</A
7621 > -<A
7622 HREF="actions-file.html#KILL-POPUPS"
7623 >kill-popups</A
7624 ></PRE
7625 ></TD
7626 ></TR
7627 ></TABLE
7628 ></P
7629 ><P
7630 > Now come the regular sections, i.e. sets of actions, accompanied
7631  by URL patterns to which they apply. Remember <SPAN
7632 CLASS="emphasis"
7633 ><I
7634 CLASS="EMPHASIS"
7635 >all actions
7636  are disabled when matching starts</I
7637 ></SPAN
7638 >, so we have to explicitly
7639  enable the ones we want.</P
7640 ><P
7641 > The first regular section is probably the most important. It has only
7642  one pattern, <SPAN
7643 CLASS="QUOTE"
7644 >"<TT
7645 CLASS="LITERAL"
7646 >/</TT
7647 >"</SPAN
7648 >, but this pattern
7649  <A
7650 HREF="actions-file.html#AF-PATTERNS"
7651 >matches all URLs</A
7652 >. Therefore, the
7653  set of actions used in this <SPAN
7654 CLASS="QUOTE"
7655 >"default"</SPAN
7656 > section <SPAN
7657 CLASS="emphasis"
7658 ><I
7659 CLASS="EMPHASIS"
7660 >will
7661  be applied to all requests as a start</I
7662 ></SPAN
7663 >. It can  be partly or
7664  wholly overridden by later matches further down this file, or in user.action,
7665  but it will still be largely responsible for your overall browsing
7666  experience.</P
7667 ><P
7668 > Again, at the start of matching, all actions are disabled, so there is
7669  no need to disable any actions here. (Remember: a <SPAN
7670 CLASS="QUOTE"
7671 >"+"</SPAN
7672 >
7673  preceding the action name enables the action, a <SPAN
7674 CLASS="QUOTE"
7675 >"-"</SPAN
7676 > disables!).
7677  Also note how this long line has been made more readable by splitting it into
7678  multiple lines with line continuation.</P
7679 ><P
7680 > <TABLE
7681 BORDER="0"
7682 BGCOLOR="#E0E0E0"
7683 WIDTH="100%"
7684 ><TR
7685 ><TD
7686 ><PRE
7687 CLASS="SCREEN"
7688 >##########################################################################
7689 # "Defaults" section:
7690 ##########################################################################
7691  { \
7692  +<A
7693 HREF="actions-file.html#DEANIMATE-GIFS"
7694 >deanimate-gifs</A
7695 > \
7696  +<A
7697 HREF="actions-file.html#FILTER-HTML-ANNOYANCES"
7698 >filter{html-annoyances}</A
7699 > \
7700  +<A
7701 HREF="actions-file.html#FILTER-REFRESH-TAGS"
7702 >filter{refresh-tags}</A
7703 > \
7704  +<A
7705 HREF="actions-file.html#FILTER-WEBBUGS"
7706 >filter{webbugs}</A
7707 > \
7708  +<A
7709 HREF="actions-file.html#FILTER-IE-EXPLOITS"
7710 >filter{ie-exploits}</A
7711 > \     
7712  +<A
7713 HREF="actions-file.html#HIDE-FORWARDED-FOR-HEADERS"
7714 >hide-forwarded-for-headers</A
7715 > \
7716  +<A
7717 HREF="actions-file.html#HIDE-FROM-HEADER"
7718 >hide-from-header{block}</A
7719 > \
7720  +<A
7721 HREF="actions-file.html#HIDE-REFERER"
7722 >hide-referrer{forge}</A
7723 > \
7724  +<A
7725 HREF="actions-file.html#PREVENT-COMPRESSION"
7726 >prevent-compression</A
7727 > \
7728  +<A
7729 HREF="actions-file.html#SESSION-COOKIES-ONLY"
7730 >session-cookies-only</A
7731 > \
7732  +<A
7733 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7734 >set-image-blocker{pattern}</A
7735 > \
7736  }
7737  / # forward slash will match *all* potential URL patterns.</PRE
7738 ></TD
7739 ></TR
7740 ></TABLE
7741 ></P
7742 ><P
7743 > The default behavior is now set.
7744  </P
7745 ><P
7746 > The first of our specialized sections is concerned with <SPAN
7747 CLASS="QUOTE"
7748 >"fragile"</SPAN
7749 >
7750  sites, i.e. sites that require minimum interference, because they are either
7751  very complex or very keen on tracking you (and have mechanisms in place that
7752  make them unusable for people who avoid being tracked). We will simply use
7753  our pre-defined <TT
7754 CLASS="LITERAL"
7755 >fragile</TT
7756 > alias instead of stating the list
7757  of actions explicitly:</P
7758 ><P
7759 > <TABLE
7760 BORDER="0"
7761 BGCOLOR="#E0E0E0"
7762 WIDTH="100%"
7763 ><TR
7764 ><TD
7765 ><PRE
7766 CLASS="SCREEN"
7767 >##########################################################################
7768 # Exceptions for sites that'll break under the default action set:
7769 ##########################################################################
7770
7771 # "Fragile" Use a minimum set of actions for these sites (see alias above):
7772 #
7773 { fragile }
7774 .office.microsoft.com           # surprise, surprise!
7775 .windowsupdate.microsoft.com
7776 mail.google.com</PRE
7777 ></TD
7778 ></TR
7779 ></TABLE
7780 ></P
7781 ><P
7782 > Shopping sites are not as fragile, but they typically
7783  require cookies to log in, and pop-up windows for shopping
7784  carts or item details. Again, we'll use a pre-defined alias:</P
7785 ><P
7786 > <TABLE
7787 BORDER="0"
7788 BGCOLOR="#E0E0E0"
7789 WIDTH="100%"
7790 ><TR
7791 ><TD
7792 ><PRE
7793 CLASS="SCREEN"
7794 ># Shopping sites:
7795 #
7796 { shop }
7797 .quietpc.com 
7798 .worldpay.com   # for quietpc.com
7799 .jungle.com
7800 .scan.co.uk</PRE
7801 ></TD
7802 ></TR
7803 ></TABLE
7804 ></P
7805 ><P
7806 > The <TT
7807 CLASS="LITERAL"
7808 ><A
7809 HREF="actions-file.html#FAST-REDIRECTS"
7810 >fast-redirects</A
7811 ></TT
7812 >
7813  action, which we enabled per default above,  breaks some sites. So disable
7814  it for popular sites where we know it misbehaves:</P
7815 ><P
7816 > <TABLE
7817 BORDER="0"
7818 BGCOLOR="#E0E0E0"
7819 WIDTH="100%"
7820 ><TR
7821 ><TD
7822 ><PRE
7823 CLASS="SCREEN"
7824 >{ -<A
7825 HREF="actions-file.html#FAST-REDIRECTS"
7826 >fast-redirects</A
7827 > }
7828 login.yahoo.com
7829 edit.*.yahoo.com
7830 .google.com
7831 .altavista.com/.*(like|url|link):http
7832 .altavista.com/trans.*urltext=http
7833 .nytimes.com</PRE
7834 ></TD
7835 ></TR
7836 ></TABLE
7837 ></P
7838 ><P
7839 > It is important that <SPAN
7840 CLASS="APPLICATION"
7841 >Privoxy</SPAN
7842 > knows which
7843  URLs belong to images, so that <SPAN
7844 CLASS="emphasis"
7845 ><I
7846 CLASS="EMPHASIS"
7847 >if</I
7848 ></SPAN
7849 > they are to
7850  be blocked, a substitute image can be sent, rather than an HTML page.
7851  Contacting the remote site to find out is not an option, since it
7852  would destroy the loading time advantage of banner blocking, and it
7853  would feed the advertisers (in terms of money <SPAN
7854 CLASS="emphasis"
7855 ><I
7856 CLASS="EMPHASIS"
7857 >and</I
7858 ></SPAN
7859 >
7860  information). We can mark any URL as an image with the <TT
7861 CLASS="LITERAL"
7862 ><A
7863 HREF="actions-file.html#HANDLE-AS-IMAGE"
7864 >handle-as-image</A
7865 ></TT
7866 > action,
7867  and marking all URLs that end in a known image file extension is a
7868  good start:</P
7869 ><P
7870 > <TABLE
7871 BORDER="0"
7872 BGCOLOR="#E0E0E0"
7873 WIDTH="100%"
7874 ><TR
7875 ><TD
7876 ><PRE
7877 CLASS="SCREEN"
7878 >##########################################################################
7879 # Images:
7880 ##########################################################################
7881
7882 # Define which file types will be treated as images, in case they get
7883 # blocked further down this file:
7884 #
7885 { +<A
7886 HREF="actions-file.html#HANDLE-AS-IMAGE"
7887 >handle-as-image</A
7888 > }
7889 /.*\.(gif|jpe?g|png|bmp|ico)$</PRE
7890 ></TD
7891 ></TR
7892 ></TABLE
7893 ></P
7894 ><P
7895 > And then there are known banner sources. They often use scripts to
7896  generate the banners, so it won't be visible from the URL that the
7897  request is for an image. Hence we block them <SPAN
7898 CLASS="emphasis"
7899 ><I
7900 CLASS="EMPHASIS"
7901 >and</I
7902 ></SPAN
7903 >
7904  mark them as images in one go, with the help of our
7905  <TT
7906 CLASS="LITERAL"
7907 >+block-as-image</TT
7908 > alias defined above. (We could of
7909  course just as well use <TT
7910 CLASS="LITERAL"
7911 >+<A
7912 HREF="actions-file.html#BLOCK"
7913 >block</A
7914 >
7915  +<A
7916 HREF="actions-file.html#HANDLE-AS-IMAGE"
7917 >handle-as-image</A
7918 ></TT
7919 > here.)
7920  Remember that the type of the replacement image is chosen by the
7921  <TT
7922 CLASS="LITERAL"
7923 ><A
7924 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7925 >set-image-blocker</A
7926 ></TT
7927 >
7928  action. Since all URLs have matched the default section with its
7929  <TT
7930 CLASS="LITERAL"
7931 >+<A
7932 HREF="actions-file.html#SET-IMAGE-BLOCKER"
7933 >set-image-blocker</A
7934 >{pattern}</TT
7935 >
7936  action before, it still applies and needn't be repeated:</P
7937 ><P
7938 > <TABLE
7939 BORDER="0"
7940 BGCOLOR="#E0E0E0"
7941 WIDTH="100%"
7942 ><TR
7943 ><TD
7944 ><PRE
7945 CLASS="SCREEN"
7946 ># Known ad generators:
7947 #
7948 { +block-as-image }
7949 ar.atwola.com 
7950 .ad.doubleclick.net
7951 .ad.*.doubleclick.net
7952 .a.yimg.com/(?:(?!/i/).)*$
7953 .a[0-9].yimg.com/(?:(?!/i/).)*$
7954 bs*.gsanet.com
7955 .qkimg.net</PRE
7956 ></TD
7957 ></TR
7958 ></TABLE
7959 ></P
7960 ><P
7961 > One of the most important jobs of <SPAN
7962 CLASS="APPLICATION"
7963 >Privoxy</SPAN
7964 >
7965  is to block banners. Many of these can be <SPAN
7966 CLASS="QUOTE"
7967 >"blocked"</SPAN
7968 >
7969  by the <TT
7970 CLASS="LITERAL"
7971 ><A
7972 HREF="actions-file.html#FILTER"
7973 >filter</A
7974 >{banners-by-size}</TT
7975 >
7976  action, which we enabled above, and which deletes the references to banner
7977  images from the pages while they are loaded, so the browser doesn't request
7978  them anymore, and hence they don't need to be blocked here. But this naturally
7979  doesn't catch all banners, and some people choose not to use filters, so we
7980  need a comprehensive list of patterns for banner URLs here, and apply the
7981  <TT
7982 CLASS="LITERAL"
7983 ><A
7984 HREF="actions-file.html#BLOCK"
7985 >block</A
7986 ></TT
7987 > action to them.</P
7988 ><P
7989 > First comes many generic patterns, which do most of the work, by
7990  matching typical domain and path name components of banners. Then comes
7991  a list of individual patterns for specific sites, which is omitted here
7992  to keep the example short:</P
7993 ><P
7994 > <TABLE
7995 BORDER="0"
7996 BGCOLOR="#E0E0E0"
7997 WIDTH="100%"
7998 ><TR
7999 ><TD
8000 ><PRE
8001 CLASS="SCREEN"
8002 >##########################################################################
8003 # Block these fine banners:
8004 ##########################################################################
8005 { <A
8006 HREF="actions-file.html#BLOCK"
8007 >+block</A
8008 > }
8009
8010 # Generic patterns:
8011
8012 ad*.
8013 .*ads.
8014 banner?.
8015 count*.
8016 /.*count(er)?\.(pl|cgi|exe|dll|asp|php[34]?)
8017 /(?:.*/)?(publicite|werbung|rekla(ma|me|am)|annonse|maino(kset|nta|s)?)/
8018
8019 # Site-specific patterns (abbreviated):
8020 #
8021 .hitbox.com</PRE
8022 ></TD
8023 ></TR
8024 ></TABLE
8025 ></P
8026 ><P
8027 > It's quite remarkable how many advertisers actually call their banner
8028  servers ads.<TT
8029 CLASS="REPLACEABLE"
8030 ><I
8031 >company</I
8032 ></TT
8033 >.com, or call the directory
8034  in which the banners are stored simply <SPAN
8035 CLASS="QUOTE"
8036 >"banners"</SPAN
8037 >. So the above
8038  generic patterns are surprisingly effective.</P
8039 ><P
8040 > But being very generic, they necessarily also catch URLs that we don't want
8041  to block. The pattern <TT
8042 CLASS="LITERAL"
8043 >.*ads.</TT
8044 > e.g. catches 
8045  <SPAN
8046 CLASS="QUOTE"
8047 >"nasty-<SPAN
8048 CLASS="emphasis"
8049 ><I
8050 CLASS="EMPHASIS"
8051 >ads</I
8052 ></SPAN
8053 >.nasty-corp.com"</SPAN
8054 > as intended,
8055  but also <SPAN
8056 CLASS="QUOTE"
8057 >"downlo<SPAN
8058 CLASS="emphasis"
8059 ><I
8060 CLASS="EMPHASIS"
8061 >ads</I
8062 ></SPAN
8063 >.sourcefroge.net"</SPAN
8064 > or
8065  <SPAN
8066 CLASS="QUOTE"
8067 >"<SPAN
8068 CLASS="emphasis"
8069 ><I
8070 CLASS="EMPHASIS"
8071 >ads</I
8072 ></SPAN
8073 >l.some-provider.net."</SPAN
8074 > So here come some
8075  well-known exceptions to the <TT
8076 CLASS="LITERAL"
8077 >+<A
8078 HREF="actions-file.html#BLOCK"
8079 >block</A
8080 ></TT
8081 >
8082  section above.</P
8083 ><P
8084 > Note that these are exceptions to exceptions from the default! Consider the URL
8085  <SPAN
8086 CLASS="QUOTE"
8087 >"downloads.sourcefroge.net"</SPAN
8088 >: Initially, all actions are deactivated,
8089  so it wouldn't get blocked. Then comes the defaults section, which matches the
8090  URL, but just deactivates the <TT
8091 CLASS="LITERAL"
8092 ><A
8093 HREF="actions-file.html#BLOCK"
8094 >block</A
8095 ></TT
8096 >
8097  action once again. Then it matches <TT
8098 CLASS="LITERAL"
8099 >.*ads.</TT
8100 >, an exception to the
8101  general non-blocking policy, and suddenly
8102  <TT
8103 CLASS="LITERAL"
8104 ><A
8105 HREF="actions-file.html#BLOCK"
8106 >+block</A
8107 ></TT
8108 > applies. And now, it'll match
8109  <TT
8110 CLASS="LITERAL"
8111 >.*loads.</TT
8112 >, where <TT
8113 CLASS="LITERAL"
8114 ><A
8115 HREF="actions-file.html#BLOCK"
8116 >-block</A
8117 ></TT
8118 >
8119  applies, so (unless it matches <SPAN
8120 CLASS="emphasis"
8121 ><I
8122 CLASS="EMPHASIS"
8123 >again</I
8124 ></SPAN
8125 > further down) it ends up
8126  with no <TT
8127 CLASS="LITERAL"
8128 ><A
8129 HREF="actions-file.html#BLOCK"
8130 >block</A
8131 ></TT
8132 > action applying.</P
8133 ><P
8134 > <TABLE
8135 BORDER="0"
8136 BGCOLOR="#E0E0E0"
8137 WIDTH="100%"
8138 ><TR
8139 ><TD
8140 ><PRE
8141 CLASS="SCREEN"
8142 >##########################################################################
8143 # Save some innocent victims of the above generic block patterns:
8144 ##########################################################################
8145
8146 # By domain:
8147
8148 { -<A
8149 HREF="actions-file.html#BLOCK"
8150 >block</A
8151 > }
8152 adv[io]*.  # (for advogato.org and advice.*)
8153 adsl.      # (has nothing to do with ads)
8154 adobe.     # (has nothing to do with ads either)
8155 ad[ud]*.   # (adult.* and add.*)
8156 .edu       # (universities don't host banners (yet!))
8157 .*loads.   # (downloads, uploads etc)
8158
8159 # By path:
8160 #
8161 /.*loads/
8162
8163 # Site-specific:
8164 #
8165 www.globalintersec.com/adv # (adv = advanced)
8166 www.ugu.com/sui/ugu/adv</PRE
8167 ></TD
8168 ></TR
8169 ></TABLE
8170 ></P
8171 ><P
8172 > Filtering source code can have nasty side effects,
8173  so make an exception for our friends at sourceforge.net,
8174  and all paths with <SPAN
8175 CLASS="QUOTE"
8176 >"cvs"</SPAN
8177 > in them. Note that
8178  <TT
8179 CLASS="LITERAL"
8180 >-<A
8181 HREF="actions-file.html#FILTER"
8182 >filter</A
8183 ></TT
8184 >
8185  disables <SPAN
8186 CLASS="emphasis"
8187 ><I
8188 CLASS="EMPHASIS"
8189 >all</I
8190 ></SPAN
8191 > filters in one fell swoop!</P
8192 ><P
8193 > <TABLE
8194 BORDER="0"
8195 BGCOLOR="#E0E0E0"
8196 WIDTH="100%"
8197 ><TR
8198 ><TD
8199 ><PRE
8200 CLASS="SCREEN"
8201 ># Don't filter code!
8202 #
8203 { -<A
8204 HREF="actions-file.html#FILTER"
8205 >filter</A
8206 > }
8207 /(.*/)?cvs
8208 bugzilla.
8209 developer.
8210 wiki.
8211 .sourceforge.net</PRE
8212 ></TD
8213 ></TR
8214 ></TABLE
8215 ></P
8216 ><P
8217 > The actual <TT
8218 CLASS="FILENAME"
8219 >default.action</TT
8220 > is of course much more
8221  comprehensive, but we hope this example made clear how it works.</P
8222 ></DIV
8223 ><DIV
8224 CLASS="SECT3"
8225 ><H3
8226 CLASS="SECT3"
8227 ><A
8228 NAME="AEN4462"
8229 >8.7.2. user.action</A
8230 ></H3
8231 ><P
8232 > So far we are painting with a broad brush by setting general policies,
8233  which would be a reasonable starting point for many people. Now, 
8234  you might want to be more specific and have customized rules that
8235  are more suitable to your personal habits and preferences. These would
8236  be for narrowly defined situations like your ISP or your bank, and should
8237  be placed in <TT
8238 CLASS="FILENAME"
8239 >user.action</TT
8240 >, which is parsed after all other 
8241  actions files and hence has the last word, over-riding any previously
8242  defined actions. <TT
8243 CLASS="FILENAME"
8244 >user.action</TT
8245 > is also a 
8246  <SPAN
8247 CLASS="emphasis"
8248 ><I
8249 CLASS="EMPHASIS"
8250 >safe</I
8251 ></SPAN
8252 > place for your personal settings, since
8253  <TT
8254 CLASS="FILENAME"
8255 >default.action</TT
8256 > is actively maintained by the
8257  <SPAN
8258 CLASS="APPLICATION"
8259 >Privoxy</SPAN
8260 > developers and you'll probably want
8261  to install updated versions from time to time.</P
8262 ><P
8263 > So let's look at a few examples of things that one might typically do in
8264  <TT
8265 CLASS="FILENAME"
8266 >user.action</TT
8267 >: </P
8268 ><P
8269 > <TABLE
8270 BORDER="0"
8271 BGCOLOR="#E0E0E0"
8272 WIDTH="100%"
8273 ><TR
8274 ><TD
8275 ><PRE
8276 CLASS="SCREEN"
8277 ># My user.action file. &#60;fred@example.com&#62;</PRE
8278 ></TD
8279 ></TR
8280 ></TABLE
8281 ></P
8282 ><P
8283 > As <A
8284 HREF="actions-file.html#ALIASES"
8285 >aliases</A
8286 > are local to the actions
8287  file that they are defined in, you can't use the ones from
8288  <TT
8289 CLASS="FILENAME"
8290 >default.action</TT
8291 >, unless you repeat them here:</P
8292 ><P
8293 > <TABLE
8294 BORDER="0"
8295 BGCOLOR="#E0E0E0"
8296 WIDTH="100%"
8297 ><TR
8298 ><TD
8299 ><PRE
8300 CLASS="SCREEN"
8301 ># Aliases are local to the file they are defined in.
8302 # (Re-)define aliases for this file:
8303 #
8304 {{alias}}
8305
8306 # These aliases just save typing later, and the alias names should 
8307 # be self explanatory.
8308 #
8309 +crunch-all-cookies = +crunch-incoming-cookies +crunch-outgoing-cookies
8310 -crunch-all-cookies = -crunch-incoming-cookies -crunch-outgoing-cookies
8311  allow-all-cookies  = -crunch-all-cookies -session-cookies-only
8312  allow-popups       = -filter{all-popups} -kill-popups
8313 +block-as-image     = +block +handle-as-image
8314 -block-as-image     = -block
8315
8316 # These aliases define combinations of actions that are useful for
8317 # certain types of sites:
8318 #
8319 fragile     = -block -crunch-all-cookies -filter -fast-redirects -hide-referrer -kill-popups
8320 shop        = -crunch-all-cookies allow-popups
8321
8322 # Allow ads for selected useful free sites:
8323 #
8324 allow-ads   = -block -filter{banners-by-size} -filter{banners-by-link}
8325
8326 # Alias for specific file types that are text, but might have conflicting
8327 # MIME types. We want the browser to force these to be text documents.
8328 handle-as-text = -<A
8329 HREF="actions-file.html#FILTER"
8330 >filter</A
8331 > +-<A
8332 HREF="actions-file.html#CONTENT-TYPE-OVERWRITE"
8333 >content-type-overwrite{text/plain}</A
8334 > +-<A
8335 HREF="actions-file.html#FORCE-TEXT-MODE"
8336 >force-text-mode</A
8337 > -<A
8338 HREF="actions-file.html#HIDE-CONTENT-DISPOSITION"
8339 >hide-content-disposition</A
8340 ></PRE
8341 ></TD
8342 ></TR
8343 ></TABLE
8344 >&#13;</P
8345 ><P
8346 > Say you have accounts on some sites that you visit regularly, and
8347  you don't want to have to log in manually each time. So you'd like
8348  to allow persistent cookies for these sites. The
8349  <TT
8350 CLASS="LITERAL"
8351 >allow-all-cookies</TT
8352 > alias defined above does exactly
8353  that, i.e. it disables crunching of cookies in any direction, and the 
8354  processing of cookies to make them only temporary.</P
8355 ><P
8356 > <TABLE
8357 BORDER="0"
8358 BGCOLOR="#E0E0E0"
8359 WIDTH="100%"
8360 ><TR
8361 ><TD
8362 ><PRE
8363 CLASS="SCREEN"
8364 >{ allow-all-cookies }
8365  sourceforge.net
8366  .yahoo.com
8367  .msdn.microsoft.com
8368  .redhat.com</PRE
8369 ></TD
8370 ></TR
8371 ></TABLE
8372 ></P
8373 ><P
8374 > Your bank is allergic to some filter, but you don't know which, so you disable them all:</P
8375 ><P
8376 > <TABLE
8377 BORDER="0"
8378 BGCOLOR="#E0E0E0"
8379 WIDTH="100%"
8380 ><TR
8381 ><TD
8382 ><PRE
8383 CLASS="SCREEN"
8384 >{ -<A
8385 HREF="actions-file.html#FILTER"
8386 >filter</A
8387 > }
8388  .your-home-banking-site.com</PRE
8389 ></TD
8390 ></TR
8391 ></TABLE
8392 ></P
8393 ><P
8394 > Some file types you may not want to filter for various reasons:</P
8395 ><P
8396 > <TABLE
8397 BORDER="0"
8398 BGCOLOR="#E0E0E0"
8399 WIDTH="100%"
8400 ><TR
8401 ><TD
8402 ><PRE
8403 CLASS="SCREEN"
8404 ># Technical documentation is likely to contain strings that might
8405 # erroneously get altered by the JavaScript-oriented filters:
8406 #
8407 .tldp.org
8408 /(.*/)?selfhtml/
8409
8410 # And this stupid host sends streaming video with a wrong MIME type,
8411 # so that Privoxy thinks it is getting HTML and starts filtering:
8412 #
8413 stupid-server.example.com/</PRE
8414 ></TD
8415 ></TR
8416 ></TABLE
8417 ></P
8418 ><P
8419 > Example of a simple <A
8420 HREF="actions-file.html#BLOCK"
8421 >block</A
8422 > action. Say you've
8423  seen an ad on your favourite page on example.com that you want to get rid of.
8424  You have right-clicked the image, selected <SPAN
8425 CLASS="QUOTE"
8426 >"copy image location"</SPAN
8427 >
8428  and pasted the URL below while removing the leading http://, into a 
8429  <TT
8430 CLASS="LITERAL"
8431 >{ +block }</TT
8432 > section. Note that <TT
8433 CLASS="LITERAL"
8434 >{ +handle-as-image
8435  }</TT
8436 > need not be specified, since all URLs ending in
8437  <TT
8438 CLASS="LITERAL"
8439 >.gif</TT
8440 > will be tagged as images by the general rules as set
8441  in default.action anyway:</P
8442 ><P
8443 > <TABLE
8444 BORDER="0"
8445 BGCOLOR="#E0E0E0"
8446 WIDTH="100%"
8447 ><TR
8448 ><TD
8449 ><PRE
8450 CLASS="SCREEN"
8451 >{ +<A
8452 HREF="actions-file.html#BLOCK"
8453 >block</A
8454 > }
8455  www.example.com/nasty-ads/sponsor\.gif
8456  another.example.net/more/junk/here/</PRE
8457 ></TD
8458 ></TR
8459 ></TABLE
8460 ></P
8461 ><P
8462 > The URLs of dynamically generated banners, especially from large banner
8463  farms, often don't use the well-known image file name extensions, which
8464  makes it impossible for <SPAN
8465 CLASS="APPLICATION"
8466 >Privoxy</SPAN
8467 > to guess
8468  the file type just by looking at the URL. 
8469  You can use the <TT
8470 CLASS="LITERAL"
8471 >+block-as-image</TT
8472 > alias defined above for
8473  these cases.
8474  Note that objects which match this rule but then turn out NOT to be an
8475  image are typically rendered as a <SPAN
8476 CLASS="QUOTE"
8477 >"broken image"</SPAN
8478 > icon by the
8479  browser. Use cautiously.</P
8480 ><P
8481 > <TABLE
8482 BORDER="0"
8483 BGCOLOR="#E0E0E0"
8484 WIDTH="100%"
8485 ><TR
8486 ><TD
8487 ><PRE
8488 CLASS="SCREEN"
8489 >{ +block-as-image }
8490  .doubleclick.net
8491  .fastclick.net
8492  /Realmedia/ads/
8493  ar.atwola.com/</PRE
8494 ></TD
8495 ></TR
8496 ></TABLE
8497 ></P
8498 ><P
8499 > Now you noticed that the default configuration breaks Forbes Magazine,
8500  but you were too lazy to find out which action is the culprit, and you
8501  were again too lazy to give <A
8502 HREF="contact.html"
8503 >feedback</A
8504 >, so
8505  you just used the <TT
8506 CLASS="LITERAL"
8507 >fragile</TT
8508 > alias on the site, and
8509  -- <SPAN
8510 CLASS="emphasis"
8511 ><I
8512 CLASS="EMPHASIS"
8513 >whoa!</I
8514 ></SPAN
8515 > -- it worked. The <TT
8516 CLASS="LITERAL"
8517 >fragile</TT
8518 >
8519  aliases disables those actions that are most likely to break a site. Also,
8520  good for testing purposes to see if it is <SPAN
8521 CLASS="APPLICATION"
8522 >Privoxy</SPAN
8523 >
8524  that is causing the problem or not. We later find other regular sites 
8525  that misbehave, and add those to our personalized list of troublemakers:</P
8526 ><P
8527 ><TABLE
8528 BORDER="0"
8529 BGCOLOR="#E0E0E0"
8530 WIDTH="100%"
8531 ><TR
8532 ><TD
8533 ><PRE
8534 CLASS="SCREEN"
8535 >{ fragile }
8536  .forbes.com
8537  webmail.example.com
8538  .mybank.com</PRE
8539 ></TD
8540 ></TR
8541 ></TABLE
8542 ></P
8543 ><P
8544 > You like the <SPAN
8545 CLASS="QUOTE"
8546 >"fun"</SPAN
8547 > text replacements in <TT
8548 CLASS="FILENAME"
8549 >default.filter</TT
8550 >,
8551  but it is disabled in the distributed actions file.
8552  So you'd like to turn it on in your private,
8553  update-safe config, once and for all:</P
8554 ><P
8555 ><TABLE
8556 BORDER="0"
8557 BGCOLOR="#E0E0E0"
8558 WIDTH="100%"
8559 ><TR
8560 ><TD
8561 ><PRE
8562 CLASS="SCREEN"
8563 >{ +<A
8564 HREF="actions-file.html#FILTER-FUN"
8565 >filter{fun}</A
8566 > }
8567  / # For ALL sites!</PRE
8568 ></TD
8569 ></TR
8570 ></TABLE
8571 ></P
8572 ><P
8573 > Note that the above is not really a good idea: There are exceptions
8574  to the filters in <TT
8575 CLASS="FILENAME"
8576 >default.action</TT
8577 > for things that
8578  really shouldn't be filtered, like code on CVS-&#62;Web interfaces. Since
8579  <TT
8580 CLASS="FILENAME"
8581 >user.action</TT
8582 > has the last word, these exceptions
8583  won't be valid for the <SPAN
8584 CLASS="QUOTE"
8585 >"fun"</SPAN
8586 > filtering specified here.</P
8587 ><P
8588 > You might also worry about how your favourite free websites are
8589  funded, and find that they rely on displaying banner advertisements
8590  to survive. So you might want to specifically allow banners for those
8591  sites that you feel provide value to you:</P
8592 ><P
8593 ><TABLE
8594 BORDER="0"
8595 BGCOLOR="#E0E0E0"
8596 WIDTH="100%"
8597 ><TR
8598 ><TD
8599 ><PRE
8600 CLASS="SCREEN"
8601 >{ allow-ads }
8602  .sourceforge.net
8603  .slashdot.org
8604  .osdn.net</PRE
8605 ></TD
8606 ></TR
8607 ></TABLE
8608 >   </P
8609 ><P
8610 > Note that <TT
8611 CLASS="LITERAL"
8612 >allow-ads</TT
8613 > has been aliased to 
8614  <TT
8615 CLASS="LITERAL"
8616 >-<A
8617 HREF="actions-file.html#BLOCK"
8618 >block</A
8619 ></TT
8620 >, 
8621  <TT
8622 CLASS="LITERAL"
8623 >-<A
8624 HREF="actions-file.html#FILTER-BANNERS-BY-SIZE"
8625 >filter{banners-by-size}</A
8626 ></TT
8627 >, and 
8628  <TT
8629 CLASS="LITERAL"
8630 >-<A
8631 HREF="actions-file.html#FILTER-BANNERS-BY-LINK"
8632 >filter{banners-by-link}</A
8633 ></TT
8634 > above.</P
8635 ><P
8636 > Invoke another alias here to force an over-ride of the MIME type <TT
8637 CLASS="LITERAL"
8638 > application/x-sh</TT
8639 > which typically would open a download type 
8640  dialog. In my case, I want to look at the shell script, and then I can save
8641  it should I choose to.</P
8642 ><P
8643 ><TABLE
8644 BORDER="0"
8645 BGCOLOR="#E0E0E0"
8646 WIDTH="100%"
8647 ><TR
8648 ><TD
8649 ><PRE
8650 CLASS="SCREEN"
8651 >{ handle-as-text }
8652  /.*\.sh$</PRE
8653 ></TD
8654 ></TR
8655 ></TABLE
8656 >   </P
8657 ><P
8658 > <TT
8659 CLASS="FILENAME"
8660 >user.action</TT
8661 > is generally the best place to define
8662  exceptions and additions to the default policies of
8663  <TT
8664 CLASS="FILENAME"
8665 >default.action</TT
8666 >. Some actions are safe to have their
8667  default policies set here though. So let's set a default policy to have a
8668  <SPAN
8669 CLASS="QUOTE"
8670 >"blank"</SPAN
8671 > image as opposed to the checkerboard pattern for
8672  <SPAN
8673 CLASS="emphasis"
8674 ><I
8675 CLASS="EMPHASIS"
8676 >ALL</I
8677 ></SPAN
8678 > sites. <SPAN
8679 CLASS="QUOTE"
8680 >"/"</SPAN
8681 > of course matches all URL
8682  paths and patterns:</P
8683 ><P
8684 ><TABLE
8685 BORDER="0"
8686 BGCOLOR="#E0E0E0"
8687 WIDTH="100%"
8688 ><TR
8689 ><TD
8690 ><PRE
8691 CLASS="SCREEN"
8692 >{ +<A
8693 HREF="actions-file.html#SET-IMAGE-BLOCKER"
8694 >set-image-blocker{blank}</A
8695 > }
8696 / # ALL sites</PRE
8697 ></TD
8698 ></TR
8699 ></TABLE
8700 ></P
8701 ></DIV
8702 ></DIV
8703 ></DIV
8704 ><DIV
8705 CLASS="NAVFOOTER"
8706 ><HR
8707 ALIGN="LEFT"
8708 WIDTH="100%"><TABLE
8709 SUMMARY="Footer navigation table"
8710 WIDTH="100%"
8711 BORDER="0"
8712 CELLPADDING="0"
8713 CELLSPACING="0"
8714 ><TR
8715 ><TD
8716 WIDTH="33%"
8717 ALIGN="left"
8718 VALIGN="top"
8719 ><A
8720 HREF="config.html"
8721 ACCESSKEY="P"
8722 >Prev</A
8723 ></TD
8724 ><TD
8725 WIDTH="34%"
8726 ALIGN="center"
8727 VALIGN="top"
8728 ><A
8729 HREF="index.html"
8730 ACCESSKEY="H"
8731 >Home</A
8732 ></TD
8733 ><TD
8734 WIDTH="33%"
8735 ALIGN="right"
8736 VALIGN="top"
8737 ><A
8738 HREF="filter-file.html"
8739 ACCESSKEY="N"
8740 >Next</A
8741 ></TD
8742 ></TR
8743 ><TR
8744 ><TD
8745 WIDTH="33%"
8746 ALIGN="left"
8747 VALIGN="top"
8748 >The Main Configuration File</TD
8749 ><TD
8750 WIDTH="34%"
8751 ALIGN="center"
8752 VALIGN="top"
8753 >&nbsp;</TD
8754 ><TD
8755 WIDTH="33%"
8756 ALIGN="right"
8757 VALIGN="top"
8758 >Filter Files</TD
8759 ></TR
8760 ></TABLE
8761 ></DIV
8762 ></BODY
8763 ></HTML
8764 >