Last modified: 2014-02-12 23:46:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50949, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48949 - Performance: investigate cookie usage
Performance: investigate cookie usage
Status: RESOLVED WONTFIX
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-29 17:32 UTC by Max Semenik
Modified: 2014-02-12 23:46 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Max Semenik 2013-05-29 17:32:21 UTC
In a discussion with the ops, I received a request to investigate whether we need both stopMobileRedirect and mf_useformat cookies.
Comment 1 Jon 2013-05-29 19:31:40 UTC
In addition to this we could probably merge the alpha and beta cookies.
Comment 2 Arthur Richards 2013-06-03 20:22:52 UTC
The mf_useformat and stopMobileRedirect cookies are functionally different things. 

* mf_useformat is used to set mobile vs desktop mode for a setup that has no separate mobile domain
* stopMobileRedirect will prevent automatic redirection of a detected 'mobile' device to the mobile view (this could be a separate mobile domain, or on a setup that relies on mf_useformat cookies for preserving mobile vs desktop mode)

We don't need both; we could conceivably use one cookie to manage these things. We could even have one cookie for storing all mobile-specific settings.

Marking resolved invalid as there's no actionable bug or problem here. if the request for investigation was motivated by some specific issue, let's file a bug for that.
Comment 3 Jon 2013-06-03 21:37:43 UTC
I think the action here is to merge the cookies to minimise cookie usage and improve performance.

As i understood the bug was that by having more than 1 cookie we were introducing performance issues.

[1:55pm] jdlrobson: judging on your analysis in answer to "I received a request to investigate whether we need both stopMobileRedirect and mf_useformat cookies." we don't need both..
[1:55pm] awjr: oh, the action as i understood it was to investigate whether or not they were needed

Let's merge them since from your report we can.
Comment 4 Arthur Richards 2013-06-03 22:59:18 UTC
What benefit would we get from merging them? I don't think merging them is a good idea, though it is possible.

We need to know what problem needs to be solved before we try to solve it, and it is totally unclear from this bug.

After chatting with MaxSem in e-person I gathered that the concern was that if a user has the stopMobileRedirect cookie present, but visits a mobile domain, their requests will always bypass cache (even if they have no other cookies present). If that was the original impetus for this bug, then the appropriate thing to do would be to strip the stopMobileRedirect cookie from the headers in Varnish. However, vcl_recv() in mobile-frontend.inc.vcl.erb makes it looks to me like this should already be happening:

 55     set req.http.X-Orig-Cookie = req.http.Cookie;
 56     if( req.http.Cookie ~ "disable" ||
 57         req.http.Cookie ~ "optin" ||
 58         req.http.Cookie ~ "session" ||
 59         req.http.Cookie ~ "forceHTTPS" ) {
 60         /* Do nothing; these are the cookies we pass.
 61          * this is a hack in the absence of X-V-O support
 62          */
 63     } else {
 64         unset req.http.Cookie;
 65     }

Anyway, I think a new bug should be opened by someone with information about the actual problem and we should act on that rather than trying to guess.
Comment 5 Jon 2013-06-04 00:19:36 UTC
OK. Max can you poke the original requestor if this is still needed?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links