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