Quick Nav:  Online Store   |   Login | Register

Cached Cookies for All Users?

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
Will Strohl
<100 Posts
Posts:88


04/07/2008 3:49 PM  

I have a module where one or more of the fields are automatically filled in using the users' cookies.  However, we have just noticed that the cookies are not necessarily being looked at.  For instance, I searched for "Value 1".  With my module, when the form is submitted, "Value 1" will then be added to a cookie.  Then, let's say that the PageBlaster cache cached this page.  The next visitor appears to have "Value 1" entered into their form field instead of whatever they last put in.  The cookies are handled server-side.

Do you know of a way to get around this?  This may force us to stop using this module. 

Even though I have been experiencing growing pains with it in figuring out what needs to be configured in order to get things to work how they originally did, I am thoroughly enjoying the performance benefits and replacement benefits it has to offer.

John Mitchell
Posts:3352


04/07/2008 4:13 PM  
Cookies are not part of the cache key by default, but in version 3.x you can add them.

You can do it in the global config using the
ext-cachekey-parameters="[PB:Request.Cookies('Value1')][PB:Request.Cookies('Value2')]"

You can also do it on a specific page which would be better by putting a PageBlaster module on the page and editing the Config.

Go to Cache Settings + Extended Cache Parameters and put those same tokens in.
Will Strohl
<100 Posts
Posts:88


06/27/2008 11:05 AM  

FYI....  I know you said that Cookies do not get cached.  However, we have web forms that pre-fill the textboxes based on what the visitor filled in that last time they were on the form.  However, since installing PageBlaster, the field is often auto-filled with values from someone else.  We even closed off the site for a moment to verify this. 

John Mitchell
Posts:3352


06/27/2008 11:11 AM  
That may be the viewstate getting cached.
It should not cache anything that is sent back as a POST to the server though.
Will Strohl
<100 Posts
Posts:88


06/27/2008 11:21 AM  
Is there anything that I can do about that?
John Mitchell
Posts:3352


06/27/2008 1:48 PM  
You could exclude the Page from being cached by PageBlaster.
Will Strohl
<100 Posts
Posts:88


06/27/2008 2:24 PM  
I was hoping that there would be a more configurable solution, as this form is present throughout the site (it is not a small site).
John Mitchell
Posts:3352


06/27/2008 5:30 PM  
If you want to stop caching based on some output in the page you can use a conditional rule.
And then set this:

[PB: CachedRequest.IsCacheable("false")]
Will Strohl
<100 Posts
Posts:88


06/27/2008 5:54 PM  
That requires an upgrade to version 3.x though right?
John Mitchell
Posts:3352


06/27/2008 6:02 PM  
Yes, that is in 3.3.

If you can give me a link to where the problem is happening, maybe I can figure out what is going on.
John Mitchell
Posts:3352


06/29/2008 9:07 PM  
Hi Will,
I checked out the site, but I was not able to see the form pre-filled with any information.

One thing to keep in mind is that if the form is filled on the server with the values from a cookie then you will need to add the cookie(s) as part of the cache-key as I described earlier in this thread. One way to avoid having to extend the cache key is to fill in the values on the client, or fill them in with an AJAX request.
Will Strohl
<100 Posts
Posts:88


07/02/2008 7:19 AM  
Great idea! I will try the client-side cookie option. Thanks.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > Cached Cookies for All Users?



ActiveForums 3.7
Powered by: Snapsis Software