Be wary of the 4k size limit :)

Martijn

On 8/8/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
> Yeah, actually, i was thinking of pushing this a even further, we
> could use one cookie for all modal windows, though it will require
> some changes to the modal window js. Still, I'd like to do that before
> 1.3 final is out.
>
> -Matej
>
> On 8/8/07, dukejansen <[EMAIL PROTECTED]> wrote:
> >
> > Okay, did some more research on this, and tracked it down.
> >
> > It turns out that IE has limits on the maximum number of cookies, and the
> > browser will just drop other cookies to make room for new ones. Each modal
> > window we open has a different cookie ID, so once we hit enough cookies to
> > push our sessionid cookie out. IE seems to max out at 20 cookies per domain.
> > (Note this is the minimum specified by the RFC for cookies, but not the
> > maximum - ie has interpreted somewhat dangerously, IMO.)
> >
> > I found this link to be a decent summary of the "max cookies" landscape:
> > http://www.thismuchiknow.co.uk/?p=13
> >
> > I guess other folks don't use as many modals as we do, or use the same
> > cookie for sizing all of them.
> >
> > One idea to improve this would be to encode all 4 modal window dimensions as
> > a single cookie, instead of 4 cookies - this would at least increase the
> > maximum. But fundamentally it sounds like the modal windows cookie issue
> > will be a problem for anyone.
> >
> > Our short-term fix is probably going to be to turn off the cookie-based
> > memory of modal window sizes, and use our default sizes instead.
> >
> > -Jason
> >
> >
> > Matej Knopp-2 wrote:
> > >
> > > Weird, for some reason, seems that the session cookie is lost. Maybe
> > > the position cookies of modal window are the fault.
> > >
> > > -Matej
> > >>
> > >> Did you ever resolve this? I am seeing the same behavior, using Wicket
> > >> 1.3
> > >> beta 2.
> > >>
> > >> Most of the modals are panel-backed, but some are page-backed.
> > >>
> > >> When ours fails, it seems the entire session is lost, no just the
> > >> pagemaps,
> > >> and user must authenticate again.
> > >>
> > >> It fails on closing 5th modal window every time when using IE7. It seems
> > >> to
> > >> be the 6th modal window in IE6. And it doesn't happen in Firefox.
> > >>
> > >> I tried setting max pagemaps to 20, I tried setting pages not to version;
> > >> this had no effect.
> > >>
> > >> Any help?
> > >>
> > >> -Jason
> > >>
> > >>
> > >> netfork wrote:
> > >> >
> > >> > Thanks .
> > >> >
> > >> > But I have specified different pagemap name.
> > >> > Example:
> > >> >> >   modalRD.setPageMapName("modalRD");
> > >> >> >   modalRD.setCookieName("modalRD");
> > >> >
> > >> > after using setMaxPageMaps() to increase total number of pagemap,
> > >> problem
> > >> > is
> > >> > still existing.
> > >> >
> > >> >
> > >> > 2007/6/10, Matej Knopp <[EMAIL PROTECTED]>:
> > >> >>
> > >> >> I think your problem is that the pages are evicted from pagemap.
> > >> >> You'll need to specify different pagemap name for each modal window
> > >> >> component (ModalWindow.setPageMapName). Also you might need to
> > >> >> increase total number of pagemap
> > >> >> (Application.getSessionSettings().setMaxPageMaps()).
> > >> >>
> > >> >> -Matej
> > >> >>
> > >> >> On 6/10/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> > >> >> > A panel is not needed, but an option. As you use a normal page
> > >> inside
> > >> >> > the modal window, I think you run into the limit of versioning.
> > >> >> >
> > >> >> > Increase your versions or disable versioning for your pages using
> > >> >> > ajax. The latter is probably the best for your usecase, popups don't
> > >> >> > typically work well with the back button in my experience.
> > >> >> >
> > >> >> > Increasing the number of versions:
> > >> >> >
> > >> >> >
> > >> >>
> > >> http://wicket.sourceforge.net/apidocs/wicket/settings/IPageSettings.html
> > >> >> >
> > >> >>
> > >> http://wicket.sourceforge.net/apidocs/wicket/settings/ISessionSettings.html#setPageMapEvictionStrategy(wicket.session.pagemap.IPageMapEvictionStrategy)
> > >> >> >
> > >> >> > Versioning is used in Wicket for keeping track of the browser's
> > >> >> backbutton:
> > >> >> >
> > >> >> >    http://cwiki.apache.org/WICKET/browser-back-forward.html
> > >> >> >    http://cwiki.apache.org/WICKET/faqs.html#FAQs-Versioning
> > >> >> >
> > >> >> > It usually doesn't work well with Ajax, as the URL in the browser
> > >> >> > window doesn't change. Back button support for ajax is scheduled for
> > >> >> > after 1.3
> > >> >> >
> > >> >> > Martijn
> > >> >> >
> > >> >> > On 6/10/07, Liu Lin <[EMAIL PROTECTED]> wrote:
> > >> >> > > Thanks for your answer.
> > >> >> > >
> > >> >> > > I am using 1.2.6.
> > >> >> > > A panel in the modal window is needed?
> > >> >> > > My modal window is a general WebPage.
> > >> >> > > Maybe when open 6th modal window, session timeout happens.
> > >> >> > >
> > >> >> > > My calling modal window's code :
> > >> >> > >
> > >> >>
> > >> -------------------------------------------------------------------------------------
> > >> >> > >
> > >> >> > >   final ModalWindow modalRD = new ModalWindow("modalRD");
> > >> >> > >   form.add(modalRD);
> > >> >> > >
> > >> >> > >   modalRD.setPageMapName("modalRD");
> > >> >> > >   modalRD.setCookieName("modalRD");
> > >> >> > >   modalRD.setPageCreator(new ModalWindow.PageCreator() {
> > >> >> > >    public Page createPage() {
> > >> >> > >     return new ModalRDPage(student);
> > >> >> > >    }
> > >> >> > >   });
> > >> >> > >
> > >> >> > >   modalRD.setWindowClosedCallback(new
> > >> >> ModalWindow.WindowClosedCallback()
> > >> >> {
> > >> >> > >    public void onClose(AjaxRequestTarget target) {
> > >> >> > >     if (null != student.getResearchDirectionCode() && !"".equals(
> > >> >> > > student.getResearchDirectionCode())) {
> > >> >> > >      collegeName.setModel(new Model(student.getCollegeName()));
> > >> >> > >      target.addComponent(collegeName);
> > >> >> > >     }
> > >> >> > >    }
> > >> >> > >   });
> > >> >> > >   modalRD.setCloseButtonCallback(new
> > >> >> ModalWindow.CloseButtonCallback()
> > >> >> {
> > >> >> > >    public boolean onCloseButtonClicked(AjaxRequestTarget target) {
> > >> >> > >     return true;
> > >> >> > >    }
> > >> >> > >   });
> > >> >> > >   form.add(new AjaxLink("showModalRD") {
> > >> >> > >    public void onClick(AjaxRequestTarget target) {
> > >> >> > >     modalRD.show(target);
> > >> >> > >    }
> > >> >> > >   });
> > >> >> > >
> > >> >>
> > >> -------------------------------------------------------------------------------------
> > >> >> > >
> > >> >> > >
> > >> >> > >
> > >> >> > > 2007/6/10, Martijn Dashorst <[EMAIL PROTECTED]>:
> > >> >> > > >
> > >> >> > > > Without code, which wicket version you are using and other
> > >> >> important
> > >> >> > > > information particular to your problem (like: do you use a panel
> > >> in
> > >> >> > > > the modal window, how many times can you open the modal window
> > >> >> before
> > >> >> > > > this happens, etc), we can't help you!
> > >> >> > > >
> > >> >> > > > Asking questions in a smart way:
> > >> >> > > > - English version:
> > >> >> http://www.catb.org/~esr/faqs/smart-questions.html
> > >> >> > > > - Chinese version:
> > >> >> http://www.lat30n.cn/doc/oss/smart-questions.html
> > >> >> > > >
> > >> >> > > > Martijn
> > >> >> > > >
> > >> >> > > > On 6/10/07, netfork <[EMAIL PROTECTED]> wrote:
> > >> >> > > > >
> > >> >> > > > > My site uses many many ModalWindow.
> > >> >> > > > > Now, find a serious problem.
> > >> >> > > > > After I log on the site, I open/close some ModalWindow.
> > >> >> > > > > At first, it's all right.
> > >> >> > > > > But after I open/close some ModalWindow many times, session
> > >> >> timeout
> > >> >> > > > > happened.
> > >> >> > > > > As a result, please watch screenshots.
> > >> >> > > > > Please help me. Thanks.
> > >> >> > > > >
> > >> >> > > > > http://www.nabble.com/file/p11047290/question.gif
> > >> >> > > > > --
> > >> >> > > > > View this message in context:
> > >> >> > > >
> > >> >>
> > >> http://www.nabble.com/Session-Timeout-Because-of-ModalWindow.-Help-me%2C-Thanks.-tf3896926.html#a11047290
> > >> >> > > > > Sent from the Wicket - Dev mailing list archive at Nabble.com.
> > >> >> > > > >
> > >> >> > > > >
> > >> >> > > >
> > >> >> > > >
> > >> >> > > > --
> > >> >> > > > Join the wicket community at irc.freenode.net: ##wicket
> > >> >> > > > Wicket 1.2.6 contains a very important fix. Download Wicket now!
> > >> >> > > > http://wicketframework.org
> > >> >> > > >
> > >> >> > >
> > >> >> > >
> > >> >> > >
> > >> >> > > --
> > >> >> > > http://www.ipcat.cn
> > >> >> > >
> > >> >> >
> > >> >> >
> > >> >> > --
> > >> >> > Join the wicket community at irc.freenode.net: ##wicket
> > >> >> > Wicket 1.2.6 contains a very important fix. Download Wicket now!
> > >> >> > http://wicketframework.org
> > >> >> >
> > >> >>
> > >> >
> > >> >
> > >>
> > >> --
> > >> View this message in context:
> > >> http://www.nabble.com/Session-Timeout-Because-of-ModalWindow.-Help-me%2C-Thanks.-tf3896926.html#a12046082
> > >> Sent from the Wicket - Dev mailing list archive at Nabble.com.
> > >>
> > >>
> > >
> > >
> >
> > --
> > View this message in context: 
> > http://www.nabble.com/Session-Timeout-Because-of-ModalWindow.-Help-me%2C-Thanks.-tf3896926.html#a12061304
> > Sent from the Wicket - Dev mailing list archive at Nabble.com.
> >
> >
>


-- 
Wicket joins the Apache Software Foundation as Apache Wicket
Apache Wicket 1.3.0-beta2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta2/

Reply via email to