Closed Bug 28284 Opened 26 years ago Closed 26 years ago

RFE: re-use charset until proven otherwise

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: rbs, Assigned: cata)

References

Details

(Whiteboard: [nsbeta2-])

Charset detection causes flashing reloads. The explanation of how this happens was provided in the following post of rickg on n.p.m.layout: Rick Gessner wrote: > The page is incrementally loaded, reflowed and > rendered up to the point that the charset code realizes the need for a > reload. The screen flashes when the page is discarded and reconstructed > (which is relatively easy to fix). Then we redraw again as the page > reloads with the new charset converter. Caching and backoff times won't > fix the first problem at all. In reply, Robert O'Callahan <roc+@cs.cmu.edu> made the following suggestion: > Hey, something that would really help with the charset problem is if the > document is initially rendered with the same charset as the last document, > making sure we don't do any extra work if we guess right. --- In general, if there is a stage whose change is susceptible to cause reload/relayout, the last state should be assumed, until proven false.
Sounds reasonable. Erik, who deals with charset?
Assignee: troy → erik
Frank, I think you are the closest to this issue...
Assignee: erik → ftang
In 4.x, we assume what ever the user set in the menu, the request is "the same charset as the last document," which is different from before. We should consider this . Reassign to cata.
reassign to cata as RFE
Assignee: ftang → cata
Preferably this should be on a per window basis (unless that complicates things too much).
What this boils down to is an additional option in the charset menu, right? Something like "Same as last document", which is overriden in the code detects something else.
Or alternatively... that "Auto detect" behaves as if it is first trying the last document's charset?
Cata, When we switch focus back to a window, should the charset cache be updated to that window's current charset and that will be the default for loading a new page in that window? So the behavior will appear the same as 4.x?
Isn't this covered by the algorithm from Kat's spec? http://www.mozilla.org/projects/intl/uidocs/browsercharmenu.html The determination of the Current Encoding/Charset will be done in the following descending order: - HTTP Charset (from server/script) - Document Meta-Charset Tag - An encoding determined by an Auto-Detector (if one is selected) - The last Current Encoding/Charset - Fallback Encoding: (this is the first encoding of the static Character Coding menu list)
Actually, I think that there are 2 issues here. One is the charset selection algorithm described in my previous comment and which needs to be fully implemented. I'm working on that one. The other one is which charset do we start to render in? Interesting problem. Yeah, for link navigation, previous page's charset is a good guess. But when the user types a new URL in "Location", I'd rather use the fallback. Also, I remember a discussion I had with Frank. He said that rendering starts only after the first block goes through the Autodetect. Doesn't that mean that the first part of the algorithm can be applied even then to obtain a "guess"? Especially we could modify the detectors to provide a "guess" on a first pass... Anyways, this whole issue is at least M15 - post beta1.
Status: NEW → ASSIGNED
Target Milestone: M15
I agree with bobj's comment and also with cata's point about different ways to deal with in-document links vs. user-supplied links via Nav Location or Open Web page UI. The specs did not go into these minute details but to preserve the integrity of the "Last current charset", there needs to be a cache refreshing if an existing window which was in the background has become the active window.
I am thinking to move this bug post M16. On one hand, it is related to 7886, so right now would be a good time to work on it. On the other hand, the requested feature is a rather cosmetic one - the reload flash. Any opinions?
Yes, not a Beta1 stopper.\
Target Milestone: M15 → M16
Target Milestone: M16 → M17
As stated above, this bug is closely linked to the override feature, bug 7886. I've made this dependent upon that bug. cata and momoi have both indicated in earlier comments that we should treat clicking on links and typing into the location bar should be handled differently. I'm not sure how valuable that is and it may confuse the user.
Depends on: 7886
Keywords: beta2
Target Milestone: M17 → M16
Keywords: nsbeta2
Putting on [nsbeta2-] radar.
Whiteboard: [nsbeta2-]
Target Milestone: M16 → M17
I think we can ship nsbeta2 without it.
won't fix this
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.