httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sorin Manolache <sor...@gmail.com>
Subject Re: Browser cookie and Apache server calls
Date Wed, 26 Jun 2013 20:55:33 GMT
On 2013-06-26 22:22, Sindhi Sindhi wrote:
> Hi,
>
> I have a C++ Apache filter module for HTML output filtering. I'm seeing a
> certain behavior when using my filter module after setting cookies and
> would want to know if thats expected.
>
> I have a html page index.html, this page has a hyperlink called "Click
> here" and when I click on this link, a second page index2.html should be
> launched.
>
> My filter applies some business logic while filtering html files.
>
> I have a cookie.html file that has Javascript to set a cookie (using
> document.cookie) in the browser.
>
> I need to do the following:
> 1. Enable my filter using LoadModule directive and start the server
> 2. Set a cookie with name=cookieName, value=cookieValue in the browser
> using the cookie.html
> 3. Launch index.html, and then click on "Click here". When this call goes
> to the filter module, I have to apply some business logic before
> index2.html is rendered on browser.
>
> But when I set the cookie in step2 above, I see that the filter module is
> not called because a server call is not made, and the browser opens the
> cached index2.html which does not have my business logic applied.
>
> And, if I dont set the cookie mentioned in step2 above, a server call is
> made when I click on "Click here" link.
>
> How can I ensure that, when I try to launch a html page from a hyperlink,
> the call goes to the filter module even when I set a browser cookie.

What happens if you clear your browser's memory and disk cache before 
you click on the hyperlink?

If it's a cache issue, then use the mod_headers module and the 'Header 
set Cache-Control "must-revalidate, no-cache"' directive to disable 
browser caching.

Sorin



>
> My apologies if I'm asking something fundamental, I'm new to how cookies
> work with web-servers, any help would be really appreciated.
>
> Thanks.
>


Mime
View raw message