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