Firefox ignoring CSS color on first view

A

alice

A few days ago I was working on a page (which is not online yet and I
don't have the code in front of me) and added something like a h1 with
a specific font color, red I think. When I viewed it for the first
time in Firefox, the text was black, but when I reloaded it, it was
red. In IE and Safari it was red the first time. This happened to
someone else in the same office. The font color was wrong the first
time they saw it in Firefox. Of course I can't duplicate the error
anymore. I've tried searching the web for any known issues like this
but can't find anything. I'm just wondering if this is a known bug of
some sort, or something that could be avoided somehow. I don't want
viewers to have to reload on the first time to get the proper color.
It may have been the child of another element with color attributes,
but this should be over-ridden by the specificity of .h1 {font-
color: } shoulnd't it? At least the other two browsers act this way.
The text was not a link, or selected on the page, or anything else I
can think of that would make it a different color, and it was not in
the cache already with an old color, it was the first time viewed with
that element added.
 
C

Chaddy2222

alice said:
A few days ago I was working on a page (which is not online yet and I
don't have the code in front of me) and added something like a h1 with
a specific font color, red I think. When I viewed it for the first
time in Firefox, the text was black, but when I reloaded it, it was
red. In IE and Safari it was red the first time. This happened to
someone else in the same office. The font color was wrong the first
time they saw it in Firefox. Of course I can't duplicate the error
anymore. I've tried searching the web for any known issues like this
but can't find anything. I'm just wondering if this is a known bug of
some sort, or something that could be avoided somehow. I don't want
viewers to have to reload on the first time to get the proper color.
It may have been the child of another element with color attributes,
but this should be over-ridden by the specificity of .h1 {font-
color: } shoulnd't it? At least the other two browsers act this way.
The text was not a link, or selected on the page, or anything else I
can think of that would make it a different color, and it was not in
the cache already with an old color, it was the first time viewed with
that element added.
Hmmm could it be a chache problem in FireFox, as an example with the
University proxxy I am currently useing I need to refresh after almost
every change has been uploaded to the server. If firefox is your
default browser then it might be that you need to go to tools > clear
Private data and clean your cache.
 
A

alice

Hmmm could it be a chache problem in FireFox, as an example with the
University proxxy I am currently useing I need to refresh after almost
every change has been uploaded to the server. If firefox is your
default browser then it might be that you need to go to tools > clear
Private data and clean your cache.

But my concern is, will anyone going to this page the first time using
Firefox also have to clear their cache in order to get it to display
the correct color? That is not desireable. There must be a way to code
a page to get Firefox to display colors correctly the first time.
 
B

Beauregard T. Shagnasty

alice said:
But my concern is, will anyone going to this page the first time using
Firefox also have to clear their cache in order to get it to display
the correct color?

Maybe, but only if they had visited the page before you changed the
color. New visitors will see it as you've coded it - _unless_ the page
is being cached at some in-the-path caching server.

Browsers can also be set to "fetch a new copy on every visit" in which
case you would have seen red text immediately.
That is not desireable. There must be a way to code a page to get
Firefox to display colors correctly the first time.

Same thing would occur with other browsers. You can't control a
visitor's browser cache.

Yeah, I know you said "In IE and Safari it was red the first time" and
it would be that way if they (those browsers) never visited before.
 
A

alice

Maybe, but only if they had visited the page before you changed the
color. New visitors will see it as you've coded it - _unless_ the page
is being cached at some in-the-path caching server.

Browsers can also be set to "fetch a new copy on every visit" in which
case you would have seen red text immediately.


Same thing would occur with other browsers. You can't control a
visitor's browser cache.

Yeah, I know you said "In IE and Safari it was red the first time" and
it would be that way if they (those browsers) never visited before.

I guess I still don't understand why it was black the first time I
loaded the page. If that happened on my computer, why wouldn't it
happen on other computers?
 
B

Beauregard T. Shagnasty

alice said:
I guess I still don't understand why it was black the first time I
loaded the page. If that happened on my computer, why wouldn't it
happen on other computers?

The page was already in your browser's cache, with a black color code.
Once you refreshed the page, you *now* pulled a fresh copy from the web
server, with the red code.

It was not in the cache on the other computers, hence they got a red
code upon first visit.
 
J

Jonathan N. Little

I guess I still don't understand why it was black the first time I
loaded the page. If that happened on my computer, why wouldn't it
happen on other computers?

If it was black the *very first* time of loading the URL when the CSS
specified red then it is not a caching error but more likely a markup
and|or CSS syntax error. But without a URL to the actual code than it is
anyone's guess.
 
A

alice

The page was already in your browser's cache, with a black color code.
Once you refreshed the page, you *now* pulled a fresh copy from the web
server, with the red code.

It was not in the cache on the other computers, hence they got a red
code upon first visit.

But on a co-workers PC, they also got the black text, even though they
had never seen the page before. It shoulnd't have been in their cache.
And this particular bit of text and the color code that goes with it,
was red from the very beginning, it was never set to black ever in
it's life time. So why would the cache have a 'black' copy of it, why
not green or blue? It only ever was red, or should have been.
 
A

alice

If it was black the *very first* time of loading the URL when the CSS
specified red then it is not a caching error but more likely a markup
and|or CSS syntax error. But without a URL to the actual code than it is
anyone's guess.

This is what I'm wondering, but if it is an error in the code, that
implies that there is a bit of code that could make text a different
color the first time it is viewed in Firefox. So even though I don't
have that code in front of me, can someone show me what kind of code -
could- do this, if it is possible?
 
J

Jonathan N. Little

alice said:
On Aug 9, 12:08 pm, "Jonathan N. Little" <[email protected]>
wrote:


First a little Usenet etiquette. Since you are not using a newsreader
but accessing via GoogleGroups you should manually remove signatures
from your quoting, the part after the '-- ' in my message.


Also you should snip anything redundant or what you are not responding to.
This is what I'm wondering, but if it is an error in the code, that
implies that there is a bit of code that could make text a different
color the first time it is viewed in Firefox. So even though I don't
have that code in front of me, can someone show me what kind of code -
could- do this, if it is possible?

No. You have it the wrong way around. Show us *your* page and we will
have at least a chance to locate the trouble.

Preemptive answers to lame excuses for *not* proving a URL:

1. If only on local LAN|machine|intranet upload a copy to a public
server and provide a URL

2. Use a temp folder on your website for examples and questions.

3. Use your personal webspace from your ISP.

4. Get free webspace from free webservers

5. Use Google to find such servers...
 
B

Ben C

On 2007-08-09 said:
This is what I'm wondering, but if it is an error in the code, that
implies that there is a bit of code that could make text a different
color the first time it is viewed in Firefox. So even though I don't
have that code in front of me, can someone show me what kind of code -
could- do this, if it is possible?

It's not possible, at least not unless you do it deliberately by writing
a cookie or tracking connections on the server. Neither are things you
could very feasibly do by accident.

There must be some other explanation.

If the second person saw black then red, but the first time they visited
the page was after it had been changed to red, then perhaps the black
version was not in the browser's cache but in the cache of a proxy
between the real server and the browser.

When you update a web-page, people can still connect (for the first
time) and get the old one for a little while. Publishing things on the
www is done by "pull" not "push". In other words, the new page isn't
pushed out to all the computers in the world, it just sits there and
they have to come and get it. A page can be marked with an expiry date
and a proxy should re-fetch any cached page anyone asks for which is
past its date. I'm not sure if the server puts some reasonable default
if you don't set it up, or if the page just goes out with no date and
proxies use their own defaults.
 
A

alice

It's not possible, at least not unless you do it deliberately by writing
a cookie or tracking connections on the server. Neither are things you
could very feasibly do by accident.

This is what I thought, thanks for being able to answer it, and not
just saying I'm lame for not providing the code or URL.
There must be some other explanation.

If the second person saw black then red, but the first time they visited
the page was after it had been changed to red,

The whole reason that this troubled me, is that it was never -changed-
to red, it always was red. There never could have been a black version
to be cached in any way shape or form. This is why I'm wondering if
anyone else has experienced this.
 
D

dorayme

alice said:
This is what I thought, thanks for being able to answer it, and not
just saying I'm lame for not providing the code or URL.


The whole reason that this troubled me, is that it was never -changed-
to red, it always was red. There never could have been a black version
to be cached in any way shape or form. This is why I'm wondering if
anyone else has experienced this.

It is not hard to get puzzles with links when you have complex
style sheets. There are all sorts of tricky issues that can throw
one. There are default style sheets that operate. In other words,
apart from cache, a browser takes all the css into account and
resolves according to the cascading rules. These are not
intuitively simple in practice. A url is very important in this
and there is nothing lame about the call for it.
 
N

Neredbojias

Well bust mah britches and call me cheeky, on Thu, 09 Aug 2007 23:14:45 GMT
alice scribed:
This is what I thought, thanks for being able to answer it, and not
just saying I'm lame for not providing the code or URL.


The whole reason that this troubled me, is that it was never -changed-
to red, it always was red. There never could have been a black version
to be cached in any way shape or form. This is why I'm wondering if
anyone else has experienced this.

What does the page look like with css disabled?
 
B

Ben C

On 2007-08-09 said:
The whole reason that this troubled me, is that it was never -changed-
to red, it always was red. There never could have been a black version
to be cached in any way shape or form. This is why I'm wondering if
anyone else has experienced this.

That is strange. I'm leaning towards dorayme's suggestion that it might
have had something to do with the HTML page arriving before the CSS file
in some way for some reason.
 
A

alice

That is strange. I'm leaning towards dorayme's suggestion that it might
have had something to do with the HTML page arriving before the CSS file
in some way for some reason.

That actually sounds like the first plausible theory so far. I did
happen on two different PCs, so if it was a freak accident it may have
been on the part of the server or network, which does open up a whole
series of possibilities. A third person in the office did not have the
same experience.
 
J

Jonathan N. Little

alice said:
That actually sounds like the first plausible theory so far. I did
happen on two different PCs, so if it was a freak accident it may have
been on the part of the server or network, which does open up a whole
series of possibilities. A third person in the office did not have the
same experience.

Of course we may dispel the speculation if we could actually *see* the code!
 
D

dorayme

"Jonathan N. Little said:
Of course we may dispel the speculation if we could actually *see* the code!

It _is_ exquisitely frustrating! To think, for all his need for
secrecy, we could poke about as much as we liked in Luigi's code.
 
J

Jonathan N. Little

dorayme said:
It _is_ exquisitely frustrating! To think, for all his need for
secrecy, we could poke about as much as we liked in Luigi's code.

I bet the answer is invalid markup. Firefox makes one *assumption* on
first load as page is build from remote source but makes another upon
drawing from cache. I have see such behavior with other bad pages and
other browsers...but screw it if this page is so secret the OP can live
with the problem!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top