I would like Akamai not to cache certain URLs if a specified cookie exist (i.e) If user logged in on specific pages. Is there anyway we can do with Akamai?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Edge Server doesn’t check for a cookie before it does the request to your origin server and I have never seen anything like that in any of their menus, conf screens or documentation.
However, there are a few ways I can think of that you can get the effect that I think you’re looking for.
You can specify in the configuration settings for the respective digital property what path(s) or URL(s) you don’t want it to cache. If you’re talking about a logged on user, you might have a path that only they would get to or you could set up such a thing server side. E.g. for an online course you would have
www.course.com/php.htmlthat anybody could get to whereas you might usewww.course.com/student/php-lesson-1.htmlfor the actual logged on lessons content. Specifying that/student/*would not be cached would solve that.If you are serving the same pages to both logged on and not-logged on users and can’t do it that way, you could check server-side if they’re logged on and if so add a cache-breaker to the links so when they follow a link a cache-breaker is automatically added. You could also do this client side if you want, but it would be more secure and faster to do it server-side. As a note on this, this could be userid-random#. That would keep it unique enough when combined with the page that nobody else would request it and get the earlier ‘cache-broken’ page.
If neither of the above are workable, there is one other way I can think of, which is a bit unconventional to say the least, but it would work. Create symbolically linked directory in your document root with another name so that you can apply the first option and exempt it from cacheing. Then you check if the guy is logged on and if so prepend the extra directory to the links. From akamai’s point of view
www.mysite.com/logged-on/page.htmlcan be exempt from cache wherewww.mysite.com/content/page.htmlis cached. On your server if/logged-on/symbolically links over to/content/then you’re all set.When they login you could send them to a subdomain which is set up as a ServerAlias, so on your side it’s the same, but on Akamai has differnt cache handling rules.