[support] anonomous users and $_Get variables

Allen Shaw publicnet at fastmail.fm
Wed Aug 25 17:23:05 UTC 2010


On 08/25/2010 11:34 AM, Mark Canney wrote:
> For anonymous users, the GET variables sent in the query string are
> ignored, ...
> The strange thing is that this works fine for an authenticated user, ...
>    
Hi Mark,

Are you sure the problem is specifically with $_GET vars?  Hearing only 
what you've explained, it seems to me a more likely cause is Drupal's 
page caching mechanism, which will save pages as static (or near-static) 
chunks of HTML and then display those chunks until the cache is x 
minutes old.  Such caching doesn't apply to authenticated users, though, 
so authenticated users get each page generated completely new on each 
request.  Anonymous users, though, would get the cached version, which 
would be a few minutes old, at least.

You might want to try again with caching turned off. In D6, you can do 
this at admin/settings/performance in the "Page cache" section at the 
top of the page.

Let us know if that fixes the problem or not.

Of course, it may just bring to light a new problem, which is: you 
probably don't want to run with cache turned off completely, so how can 
you do both at the same time?  I don't think you can: if you want 
up-to-the-second dynamic data, you can't cache the stuff.

But you may be able to get away with block-level caching or similarly 
caching only the parts of the page where your dynamic data does not appear.

All the best,
Allen


More information about the support mailing list