>Appendix</TITLE
><META
NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.60"><LINK
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
REL="HOME"
-TITLE="Privoxy User Manual"
+TITLE="Privoxy 3.1.1 User Manual"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="See Also"
><DIV
CLASS="NAVHEADER"
><TABLE
+SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
><TH
COLSPAN="3"
ALIGN="center"
->Privoxy User Manual</TH
+>Privoxy 3.1.1 User Manual</TH
></TR
><TR
><TD
VALIGN="bottom"
><A
HREF="seealso.html"
+ACCESSKEY="P"
>Prev</A
></TD
><TD
><H1
CLASS="SECT1"
><A
-NAME="APPENDIX"
->14. Appendix</A
-></H1
+NAME="APPENDIX">14. Appendix</H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
-NAME="REGEX"
->14.1. Regular Expressions</A
-></H2
+NAME="REGEX">14.1. Regular Expressions</H2
><P
> <SPAN
CLASS="APPLICATION"
><TBODY
><TR
><TD
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>.</I
+></SPAN
> - Matches any single character, e.g. <SPAN
CLASS="QUOTE"
>"a"</SPAN
><TBODY
><TR
><TD
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>?</I
+></SPAN
> - The preceding character or expression is matched ZERO or ONE
times. Either/or.
</TD
><TBODY
><TR
><TD
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>+</I
+></SPAN
> - The preceding character or expression is matched ONE or MORE
times.
</TD
><TBODY
><TR
><TD
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>*</I
+></SPAN
> - The preceding character or expression is matched ZERO or MORE
times.
</TD
><TBODY
><TR
><TD
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>\</I
+></SPAN
> - The <SPAN
CLASS="QUOTE"
>"escape"</SPAN
><TBODY
><TR
><TD
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>[]</I
+></SPAN
> - Characters enclosed in brackets will be matched if
any of the enclosed characters are encountered. For instance, <SPAN
CLASS="QUOTE"
><TBODY
><TR
><TD
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>()</I
+></SPAN
> - parentheses are used to group a sub-expression,
or multiple sub-expressions.
</TD
><TBODY
><TR
><TD
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>|</I
+></SPAN
> - The <SPAN
CLASS="QUOTE"
>"bar"</SPAN
list. This is enough to get us started with a few simple examples which may
be more illuminating:</P
><P
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
><TT
CLASS="LITERAL"
>/.*/banners/.*</TT
></I
+></SPAN
> - A simple example
that uses the common combination of <SPAN
CLASS="QUOTE"
><P
> A now something a little more complex:</P
><P
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
><TT
CLASS="LITERAL"
>/.*/adv((er)?ts?|ertis(ing|ements?))?/</TT
></I
+></SPAN
> -
We have several literal forward slashes again (<SPAN
CLASS="QUOTE"
CLASS="QUOTE"
>".*"</SPAN
>, so we are matching against any conceivable sub-path, just so
- it matches our expression. The only true literal that <I
+ it matches our expression. The only true literal that <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>must
match</I
+></SPAN
> our pattern is <SPAN
CLASS="APPLICATION"
>adv</SPAN
CLASS="QUOTE"
>"ing"</SPAN
>
- <I
+ <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>OR</I
+></SPAN
> <SPAN
CLASS="QUOTE"
>"ements?"</SPAN
>, which would then match
either spelling.</P
><P
-> <I
+> <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
><TT
CLASS="LITERAL"
>/.*/advert[0-9]+\.(gif|jpe?g)</TT
></I
+></SPAN
> - Again
another path statement with forward slashes. Anything in the square brackets
<SPAN
>http://www.perldoc.com/perl5.6/pod/perlre.html</A
></P
><P
-> For information on regular expression based substititions and their applications
+> For information on regular expression based substitutions and their applications
in filters, please see the <A
HREF="filter-file.html"
>filter file tutorial</A
><H2
CLASS="SECT2"
><A
-NAME="AEN3353"
->14.2. <SPAN
+NAME="AEN3474">14.2. <SPAN
CLASS="APPLICATION"
>Privoxy</SPAN
->'s Internal Pages</A
-></H2
+>'s Internal Pages</H2
><P
> Since <SPAN
CLASS="APPLICATION"
Privoxy main page:
</P
><A
-NAME="AEN3368"
-></A
-><BLOCKQUOTE
+NAME="AEN3489"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
TARGET="_top"
>http://p.p/</A
> (But it
- doesn't provide a fallback to a real page, in case the request is not
+ doesn't provide a fall-back to a real page, in case the request is not
sent through <SPAN
CLASS="APPLICATION"
>Privoxy</SPAN
editing of actions files:
</P
><A
-NAME="AEN3376"
-></A
-><BLOCKQUOTE
+NAME="AEN3497"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
Show the source code version numbers:
</P
><A
-NAME="AEN3381"
-></A
-><BLOCKQUOTE
+NAME="AEN3502"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
Show the browser's request headers:
</P
><A
-NAME="AEN3386"
-></A
-><BLOCKQUOTE
+NAME="AEN3507"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
Show which actions apply to a URL and why:
</P
><A
-NAME="AEN3391"
-></A
-><BLOCKQUOTE
+NAME="AEN3512"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
to run, but only as a pass-through proxy, with no actions taking place:
</P
><A
-NAME="AEN3397"
-></A
-><BLOCKQUOTE
+NAME="AEN3518"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
> Short cuts. Turn off, then on:
</P
><A
-NAME="AEN3401"
-></A
-><BLOCKQUOTE
+NAME="AEN3522"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
</P
></BLOCKQUOTE
><A
-NAME="AEN3404"
-></A
-><BLOCKQUOTE
+NAME="AEN3525"><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>
><H3
CLASS="SECT3"
><A
-NAME="BOOKMARKLETS"
->14.2.1. Bookmarklets</A
-></H3
+NAME="BOOKMARKLETS">14.2.1. Bookmarklets</H3
><P
> Below are some <SPAN
CLASS="QUOTE"
><P
> Credit: The site which gave us the general idea for these bookmarklets is
<A
-HREF="http://www.bookmarklets.com"
+HREF="http://www.bookmarklets.com/"
TARGET="_top"
>www.bookmarklets.com</A
>. They
><H2
CLASS="SECT2"
><A
-NAME="CHAIN"
->14.3. Chain of Events</A
-></H2
+NAME="CHAIN">14.3. Chain of Events</H2
><P
> Let's take a quick look at the basic sequence of events when a web page is
requested by your browser and <SPAN
><P
> First, the server headers are read and processed to determine, among other
things, the MIME type (document type) and encoding. The headers are then
- filtered as deterimed by the
+ filtered as determined by the
<A
HREF="actions-file.html#CRUNCH-INCOMING-COOKIES"
><SPAN
><H2
CLASS="SECT2"
><A
-NAME="ACTIONSANAT"
->14.4. Anatomy of an Action</A
-></H2
+NAME="ACTIONSANAT">14.4. Anatomy of an Action</H2
><P
> The way <SPAN
CLASS="APPLICATION"
>
to any given URL can be complex, and not always so
easy to understand what is happening. And sometimes we need to be able to
- <I
+ <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>see</I
+></SPAN
> just what <SPAN
CLASS="APPLICATION"
>Privoxy</SPAN
HREF="appendix.html#BOOKMARKLETS"
>the Bookmarklets</A
> section on a quick
- and easy way to do this (be sure to flush caches afterward!).</P
+ and easy way to do this (be sure to flush caches afterward!). Looking at the
+ logs is a good idea too.</P
><P
> <SPAN
CLASS="APPLICATION"
></A
>
(i.e. not persistent). So we will allow persistent cookies for google. The
- second turns <I
+ second turns <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>off</I
+></SPAN
> any
<A
HREF="actions-file.html#FAST-REDIRECTS"
>"+block"</SPAN
></A
>
- <I
+ <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>and</I
+></SPAN
> an
<A
HREF="actions-file.html#HANDLE-AS-IMAGE"
CLASS="QUOTE"
>"http://www.rhapsodyk.net/adsl/HOWTO/"</SPAN
>.
- This one is giving us problems. We are getting a blank page. Hmmm...</P
+ This one is giving us problems. We are getting a blank page. Hmmm ...</P
><P
> <TABLE
BORDER="0"
>"/ads"</SPAN
>! But
we did not want this at all! Now we see why we get the blank page. We could
- now add a new action below this that explicitly does <I
+ now add a new action below this that explicitly does <SPAN
+CLASS="emphasis"
+><I
CLASS="EMPHASIS"
>not</I
+></SPAN
>
block (<SPAN
CLASS="QUOTE"
One likely cause would be one of the <SPAN
CLASS="QUOTE"
>"{+filter}"</SPAN
-> actions. Try
- adding the URL for the site to one of aliases that turn off <SPAN
+> actions. These
+ tend to be harder to troubleshoot. Try adding the URL for the site to one of
+ aliases that turn off <SPAN
CLASS="QUOTE"
>"+filter"</SPAN
>:</P
></TABLE
></P
><P
-> This would probably be most appropriately put in <TT
+> This would turn off all filtering for that site. This would probably be most
+ appropriately put in <TT
CLASS="FILENAME"
>user.action</TT
->,
- for local site exceptions.</P
+>, for local site
+ exceptions.</P
+><P
+> Images that are inexplicably being blocked, may well be hitting the
+ <SPAN
+CLASS="QUOTE"
+>"+filter{banners-by-size}"</SPAN
+> rule, which assumes
+ that images of certain sizes are ad banners (works well most of the time
+ since these tend to be standardized).</P
><P
> <SPAN
CLASS="QUOTE"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
VALIGN="top"
><A
HREF="seealso.html"
+ACCESSKEY="P"
>Prev</A
></TD
><TD
VALIGN="top"
><A
HREF="index.html"
+ACCESSKEY="H"
>Home</A
></TD
><TD