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