Re: [squid-users] Prevent squid from caching a page

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 14 Nov 2009 13:17:57 +1300

Mike Marchywka wrote:
>
> ----------------------------------------
>> Date: Fri, 13 Nov 2009 11:17:54 -0500
>> From: mrambo_at_lsd.k12.mi.us
>> To: squid-users_at_squid-cache.org
>> Subject: Re: [squid-users] Prevent squid from caching a page
>>
>> Landy Landy wrote:
>>> Is there a way to tell squid not to cache a page or have it ignore it? Theres a page I cannot view from our lan: www.dgii.gob.do. I don't know why but, I'm suspecting there must be something with squid since, I noticed I receive the page's title and it disappears.
>>>
>>> Please help with this thanks.
>>>

  * Maybe the browser if it's IE6 (IIRC) and a page with CSS2 styling or
non-trivial XHTML.
  ++ This requires a browser upgrade. If you still have IE6 please
upgrade anyway, the newer ones are a _much_ better viewing experience.

  * Maybe broken javascript/AJAX code on the page if the title actually
appears then disappears again.

The browser should have a "view page source" or similar option somewhere
(edit menu?). This will show you what HTML data the page has received.
If the page code is all there the problem is one of the two above.

If the HTML code received by the browser is incomplete. Look at where
Squid is getting it from.

  * If its coming from cache (TCP_HIT) thats a corrupt entry in the
cache storage.

++ You will need to purge it and re-fetch. Using a PURGE HTTP request
from an authorized machine or a force-reload (browser dependent ctrl or
shift button held down while clicking the refresh button).
   ++ assuming you have not disabled force-reload in the refresh_pattern
rules of your squid.

  * If its coming from the network (TCP_MISS) check what Squid is
receiving. The data may be chopped off by something further upstream.
   - something upstream (or a peer) may be configured with quick_abort_*
settings and causing yours to believe the object is finished when it
stops sending an unknown-length object in the middle.

++ this is where not cachign the object is useful.

  * Check the object Content-Length received by Squid matches the actual
size of data received.
   - Squid maybe logging "excess data from" messages which mean the
server is broken and effectively doing: "here are 2 bytes" then passing
5 in.

++ There is nothing you can do about this problem except yell at the
upstream server operator until they fix it.

>>>
>>>
>> Check out the no_cache directive.

Now obsolete. Use "cache deny" instead please to prevent storage of
objects by Squid-2.6 or later.

>
> I downloaded and installed the ad zapper.How would you rate
> that as a learning tool for stuff like this?
>

I would rate adzapper as irrelevant to issues receiving the full body of
a reply object.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE20
   Current Beta Squid 3.1.0.14
Received on Sat Nov 14 2009 - 00:18:45 MST

This archive was generated by hypermail 2.2.0 : Sat Nov 14 2009 - 12:00:02 MST