Closed
Bug 6117
Opened 26 years ago
Closed 24 years ago
[FEATURE] Append CCK's custom string to browser's user agent string
Categories
(SeaMonkey :: UI Design, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: robinf, Assigned: vparthas)
References
Details
(Whiteboard: [nsbeta2-][nsbeta3+][pdtp1])
We want to be able to append the "Company Identifier" string that the CCK user
enters in the CCK Wizard to the browser's user agent string. Not sure what
Component category this bug belongs to, so I just took a guess.
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Updated•25 years ago
|
Status: VERIFIED → REOPENED
Comment 3•25 years ago
|
||
I don't believe this was appropriate to dup to 806 since the fix for 806 didn't
include this feature.
In 4.x (according to the old winfe/nsapp.cpp) we keyed off the existence of a
configuration pref called "user_agent" and when it existed we would add
C-<user_agent_prev_value> to the user agent string. See the routine
ResolveAppVersion for the exact code.
There appear to be other places where this logic existed since winfe/custom.cpp
did something almost but not quite identical.
Updated•25 years ago
|
Assignee: selmer → don
Status: REOPENED → NEW
Comment 4•25 years ago
|
||
Don, I'm sending this back to you with the info on how we did this in 4.x.
Component: UE/UI → XPApps
Priority: P3 → P1
Summary: Append CCK's custom string to browser's user agent string → [FEATURE] Append CCK's custom string to browser's user agent string
Target Milestone: M10
The mighty user agent service will slay this foul beast!
The pref in question is just "user_agent"?
Reporter | ||
Comment 10•25 years ago
|
||
CC:'ing Bijal so he can answer Don's question. Is this a Beta 1 feature for CCK?
Comment 11•25 years ago
|
||
This is a beta 2 feature, especially since netscape.cfg is a beta 2 feature for
Seamonkey.
Comment 13•25 years ago
|
||
*** Bug 20941 has been marked as a duplicate of this bug. ***
Comment 14•25 years ago
|
||
Don, it may be that this should be assigned to shaver. I just marked 20941 as a
dup of this because this one is older. 20941 was assigned to shaver and we had
worked out how this was to be implemented. Adding shaver to the cc list.
Comment 16•24 years ago
|
||
M17 for mcafee ...
Comment 17•24 years ago
|
||
Putting on [nsbeta2+][5/16] radar. This is a feature MUST complete work by
05/16 or we may pull this feature for PR2.
Whiteboard: [nsbeta2+][5/16]
Comment 18•24 years ago
|
||
I have no idea what this bug is about. Can someone shed some light here?
Assignee | ||
Comment 19•24 years ago
|
||
This bug will give a better understanding of the problem. A pref is
needed so that the user agent string gets the "C-" tag inserted and
then the value of the pref gets added as well -> in the form of
Netscape 5.0 [en] C- <foo>.We can choose to have a different tag for
mozilla say "M-". The length of this value can be limited to say 10
extra characters or so.
Adding myself to CC.
Comment 21•24 years ago
|
||
Don, this bug is a requirement for CCK's PR2 features. PDT marked the bug
nsbeta2+ so we are expecting this to be fixed. Is there a change in the plans?
Comment 22•24 years ago
|
||
Putting on [nsbeta2-] radar. Removing [5/16]. Will do for nsbeta3
Keywords: nsbeta3
Whiteboard: [nsbeta2+][5/16] → [nsbeta2-]
Comment 24•24 years ago
|
||
I think valeski added the code for customizing the user-agent. So it might just
be him explaining how to do it.
Comment 25•24 years ago
|
||
use this attribte,
http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/public/nsIHTTPProt
ocolHandler.idl#152. First *get* the attribute, append your string to it, then
set the whole string back in using that attribute.
Status: NEW → RESOLVED
Closed: 25 years ago → 24 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 26•24 years ago
|
||
Re-opening bug.
We need a pref to do this change.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 27•24 years ago
|
||
Reassigning to XPapps to implement a preference that will customize the user
agent string.
Assignee: valeski → don
Status: REOPENED → NEW
QA Contact: sairuh
Whiteboard: [nsbeta2-]
Comment 28•24 years ago
|
||
This is an extremely critical bug/feature for N6 Client Customization Kit. The
most basic customization is appending to the user agent string already in the
browser. CCK tool tags anyone who uses CCK to customize the browser with
"-CCK". Distributors can also add their own tag to the user agent string. This
tagged user agent string is used to measure indirect revenue from distributors.
Bill Law and I talked about this and we could easily append the CCK string to
the vendor portion.
In Communicator 4.x and CCK 4.x, the following javascript is in the netscape.cfg
for the user agent string append command:
with (PrefConfig) {
config("user_agent", "CCK-MCD bij's browser");
}
Comment 30•24 years ago
|
||
Does:
with (PrefConfig) {
config("user_agent", "CCK-MCD bij's browser");
}
put an entry in prefs.js or somewhere else (e.g., netscape.cfg or equivalent)?
I guess what I need to know is how to get this value *out* (from wherever it
goes).
Comment 31•24 years ago
|
||
Not sure it puts a value at all. Basically, the code I supplied is in the
netscape.cfg which is a hashed preference file in Communicator. Everytime you
launch Communicator, this file is read and it appends to the user agent string
dynamically. Therefore, this javascript does not change the actual user agent
string in Communicator code.
Comment 32•24 years ago
|
||
OK, I think I've found what I need. The 4.x code calls PREF_CopyConfigString
to get this customized user agent string. I'll use the same API (it's in the
6.0 version of prefapi).
Yo, Varada; does that sound right?
Assignee | ||
Comment 33•24 years ago
|
||
with (PrefConfig) {
config("user_agent", "CCK-MCD bij's browser");
}
is present in the prefs.js which is the input to create the netscape.cfg.
This will change the value of the pref IFF the pref exists and not otherwise and
so in reply to your question.
Yes you are right :-)
Use of the non-XPCOM pref API makes me wince. Is it really necessary?
Status: NEW → ASSIGNED
Comment 35•24 years ago
|
||
I guess that's what I'm asking. I don't understand this netscapt.cfg magic. If
I just read the "user_agent" pref using the conventional means would I get what
I need? Varada, does that question make sense? If so, what's the answer?
Comment 37•24 years ago
|
||
I believe so. The preferenes are read during launch of Seamonkey. When an end
user changes his/her preferences through the edit dialog, they are changed in
memory, but not on disk. When the browser is closed (quit), the preferences are
saved.
This user agent preference is read on launch and there is no way to change it
from the client.
Assignee: don → law
Status: ASSIGNED → NEW
Depends on: 5132
Whiteboard: [nsbeta2-] → [nsbeta2-][nsbeta3+]
Comment 38•24 years ago
|
||
Marking [nsbeta3+] per discussion with Bijal. Note that this bug depends on
5132.
Comment 39•24 years ago
|
||
yes, don't worry about libpref's unique way of defining prefs, just use
CopyCharPref where appropriate
Comment 40•24 years ago
|
||
Please make it so that we can put this special "user agent" string in any prefs
file such as foo.js. Therefore, you do not need to have netscape.cfg to have
this preference working.
Comment 41•24 years ago
|
||
I found out that our http protocol handler is already using the content of
various pref settings to determine the user agent string. See
http://lxr.mozilla.org/seamonkey/source/netwerk/protocol/http/src/nsHTTPHandler.
cpp#615.
This means that if CCK arranged to set, say, "general.useragent.vendorComment"
then that would automatically appear in the user agent string. I think that
might be better than adding additional code on top of what's there already.
For example, you could put this in your prefs.js right now:
user_pref("general.useragent.vendorComment", "CCK-MCD bij's browser");
The only drawback would be if CCK is only capable of setting the "user_agent"
pref, rather than "general.useragent.vendorComment" (or some other
general.useragent pref).
Can CCK use the existing pref? Or, do I need to add the code that extracts the
"user_agent" pref and inserts it into the vendor comment field?
Status: NEW → ASSIGNED
Comment 42•24 years ago
|
||
We think CCK can manage this by simply setting the
general.useragent.vendorComment pref (rather than the user_agent pref).
So, I'm reassigning to Varada to prompt him (or somebody) to tweak CCK to do
that. Leaving [nsebeta3+]; hope that's OK.
Assignee: law → varada
Status: ASSIGNED → NEW
Comment 43•24 years ago
|
||
PDT agrees P1
Comment 45•24 years ago
|
||
Adding [pdtp1] in status summary.
Whiteboard: [nsbeta2-][nsbeta3+] → [nsbeta2-][nsbeta3+][pdtp1]
Assignee | ||
Comment 46•24 years ago
|
||
The user agent which is an aggregate of 8 different pref values including the
vendor comment. The vendor comment is given the value of the customized string
thru CCK. This then gets inserted in the pref file and is read by the browser
and is used while creating the overall value for the navigator.userAgent.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 47•24 years ago
|
||
Varada, please add to this bug examples of the following:
*user agent string customized by CCK user (for example, MyISP)
*user agent string default (not customized by CCK user)
Thanks.
Comment 50•23 years ago
|
||
qa to me since blee is on sabatical. Verified on CCK build 2001-09-24-07
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•