#669 ✓ resolved
Dominik Dorn

create session only when absolute necessary

Reported by Dominik Dorn | March 21st, 2011 @ 06:02 PM | in 1.2

Framework version: 1.1.1
Platform you're using: ubuntu 10.10 x64

Reproduction steps:
go to any play page without any user interaction, a session cookie is created, although it wouldn't be necessary.

Details:
A session cookie is created on every request of a resource. play should only create a session cookie if there is really data to be stored in the session.

see this conversation on the mailing list (sorry, couldn't get the direct link)

from Guillaume Bort
reply-to play-framework@googlegroups.com
to play-framework@googlegroups.com
date Mon, Mar 21, 2011 at 10:20 AM
subject Re: [play-framework] prevent session creation without user interaction?
mailing list <play-framework.googlegroups.com> Filter messages from this mailing list
mailed-by gmail.com
signed-by googlegroups.com
unsubscribe Unsubscribe from this mailing-list

Important mainly because of your interaction with messages in the conversation.

hide details 10:20 AM (8 hours ago)

It should be the default behavior, I agree. Please report the issue.
- Hide quoted text -

On Sat, Mar 19, 2011 at 2:15 PM, Dominik Dorn wrote:

Hi,

I want to speed up my pages response time, at least for those pages that remain quite static as long as the user isn't logged in (like the Application.index() action).

How do you speed up your pages? Simply with the #{cache /} tag?

My approach: I want to front my play instance with a proxy and cache the results. As my pages get customized as soon as a user is logged in, I would like to prevent play from creating cookies unless I really store something in the session, so that I can configure the proxy to cache all requests that don't contain the play cookie.

Is there a way to configure this behavior?

Or how do you speed up your pages?

Thanks, Dominik

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Play framework

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the http://www.playframework.org website.

Source code is hosted on github

Check out our repository at http://github.com/playframework/play

Contributing, creating a patch

Please read the contributor guide

Reporting Security Vulnerabilities

Since all bug reports are public, please report any security vulnerability directly to guillaume dot bort at gmail dot com.

Creating a bug report

Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Shared Ticket Bins

Referenced by

Pages