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