473,405 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

page ugly before css is loaded

Hi, I developed a site and used css. I put almost all style
information in the css and used a lot of "id=my_css_class" in the
html. They is little style specification in the html. I found that on
some computers with slow internet links this seems to be a small
problem. Looks like the html page was loaded first and displayed in a
very ugly layout because the css has not be loaded yet. Then the css
was loaded and the page became beautiful. This may take only one
second but the viewer can see clearly the ugly page. I think it can be
improved. Yahoo uses css and I never saw the ugly page.

Can I ask the css be load first so the ugly page will not be shown? Is
it better to put more style specification in the html file, some thing
like

<table sytle="boder:0px; ...;">
....

Thank you very much.

qq
Jul 20 '05 #1
6 3921
Quoth the raven named Quick Function:
Hi, I developed a site and used css. I put almost all style
information in the css and used a lot of "id=my_css_class" in the
html. They is little style specification in the html. I found that
on some computers with slow internet links this seems to be a small
problem. Looks like the html page was loaded first and displayed
in a very ugly layout because the css has not be loaded yet. Then
the css was loaded and the page became beautiful. This may take
only one second but the viewer can see clearly the ugly page. I
think it can be improved. Yahoo uses css and I never saw the ugly
page.
This page should answer your questions. It's an IE thing.
http://www.bluerobot.com/web/css/fouc.asp
Can I ask the css be load first so the ugly page will not be shown?
Is it better to put more style specification in the html file, some
thing like

<table sytle="boder:0px; ...;"> ...


No, you should keep your presentation in the CSS file.

What's your URL?

--
-bts
-This space intentionally left blank.
Jul 20 '05 #2
Quoth the raven named Quick Function:
Hi, I developed a site and used css. I put almost all style
information in the css and used a lot of "id=my_css_class" in the
html. They is little style specification in the html. I found that
on some computers with slow internet links this seems to be a small
problem. Looks like the html page was loaded first and displayed
in a very ugly layout because the css has not be loaded yet. Then
the css was loaded and the page became beautiful. This may take
only one second but the viewer can see clearly the ugly page. I
think it can be improved. Yahoo uses css and I never saw the ugly
page.
This page should answer your questions. It's an IE thing.
http://www.bluerobot.com/web/css/fouc.asp
Can I ask the css be load first so the ugly page will not be shown?
Is it better to put more style specification in the html file, some
thing like

<table sytle="boder:0px; ...;"> ...


No, you should keep your presentation in the CSS file.

What's your URL?

--
-bts
-This space intentionally left blank.
Jul 20 '05 #3
On Sat, 24 Apr 2004 15:48:54 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
Quoth the raven named Quick Function: [...]
I found that on some computers with slow internet links
this seems to be a small problem. Looks like the html
page was loaded first and displayed in a very ugly layout
because the css has not be loaded yet. [...]
This page should answer your questions. It's an IE thing.
http://www.bluerobot.com/web/css/fouc.asp

Can I ask the css be load first so the ugly page will
not be shown?


No, this is not something that you can "control" from the user side.

Even if the suggested page at 'bluerobot' gives an explanation for
something that might be seen as an "inconvenience" in the behavior of
MS-IE, that behavior can not be labeled as an error.

Ask yourself; how long should the user agent really have to wait for the
CSS document, until it starts rendering what it have got already in the
form of marked up content? 1 second? 10 seconds? half an hour? forever?

For the case of CSS; it's an _optional_ addition to a marked up document
and there is no rule at all that says it must be made available.

The background of this "behavior" is to be found in how an HTTP
transaction is defined to take place. Each and every HTTP transaction is
its own process that knows nothing about any other HTTP transaction that
might be running in parallel and it's in fact simplicity spelled out.

User agent sends an HTTP request to a server asking
for a resource to be served.
An HTTP connection is established.
The server serves the requested resource, and when done,
closes the HTTP connection. End of story.

Now there may be many different reasons for a resource linked from your
markup to be delayed in arrival into your UA.

Just a few examples;

The first, and most obvious; your UA must be allowed to get and parse at
least as much of your markup that is required to find out that it must
initiate more HTTP requests to get the rest of what is needed for a full
rendering.

Bigger size ISP's are running their service to customers out of computer
clusters [1] in which case there is no way for a customer to know
exactly how his web account has been physically distributed within the
cluster.

Following that, you may have one computer in a cluster that is readily
available to serve your markup, but when your UA makes the following
requests for additional resources, these may be physically stored on
some other computer in the cluster that just happens to be busy serving
content to other users and can not allocate the time slots your
resources needs at that time. Your extra resources will be served, but
with a delay.

Or even worse; your markup gets served but the cluster member computer
that holds your CSS document is temporary down for some reason and your
UA ends up waiting for some considerable time for e.g. your CSS
definitions.

Add to that each and every Internet proxy server that may be sitting in
your path between you and your ISP; and these proxies may have a will of
their own too when it comes to serving additional resources to your UA.

Please note that this line of reasoning holds true for all kinds of
extra resources requested from a UA, be that CSS, images, pdf's or
whatever.

The base line is; if you use HTTP requests for to get resources loaded
into your UA you must adopt a "live with the situation" approach.

Various UA's may have been programmed to handle HTTP transaction delays
in more or less convenient ways for the end user but this is nothing
that can be "controlled" by a page author. Don't think of "control" on
the server side either, it will not work good but just add insult to
injury.

--
Rex

[1] I don't think that Digital Equipment was the company that invented
the concept of "computer clusters" but they did run that concept to some
real heights with their VAX/VMS line of computers. A VAX cluster
appeared to the outside world as "one computer" but could in reality be
just about any number of physical machines in various locations.
Jul 20 '05 #4
On Sat, 24 Apr 2004 15:48:54 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
Quoth the raven named Quick Function: [...]
I found that on some computers with slow internet links
this seems to be a small problem. Looks like the html
page was loaded first and displayed in a very ugly layout
because the css has not be loaded yet. [...]
This page should answer your questions. It's an IE thing.
http://www.bluerobot.com/web/css/fouc.asp

Can I ask the css be load first so the ugly page will
not be shown?


No, this is not something that you can "control" from the user side.

Even if the suggested page at 'bluerobot' gives an explanation for
something that might be seen as an "inconvenience" in the behavior of
MS-IE, that behavior can not be labeled as an error.

Ask yourself; how long should the user agent really have to wait for the
CSS document, until it starts rendering what it have got already in the
form of marked up content? 1 second? 10 seconds? half an hour? forever?

For the case of CSS; it's an _optional_ addition to a marked up document
and there is no rule at all that says it must be made available.

The background of this "behavior" is to be found in how an HTTP
transaction is defined to take place. Each and every HTTP transaction is
its own process that knows nothing about any other HTTP transaction that
might be running in parallel and it's in fact simplicity spelled out.

User agent sends an HTTP request to a server asking
for a resource to be served.
An HTTP connection is established.
The server serves the requested resource, and when done,
closes the HTTP connection. End of story.

Now there may be many different reasons for a resource linked from your
markup to be delayed in arrival into your UA.

Just a few examples;

The first, and most obvious; your UA must be allowed to get and parse at
least as much of your markup that is required to find out that it must
initiate more HTTP requests to get the rest of what is needed for a full
rendering.

Bigger size ISP's are running their service to customers out of computer
clusters [1] in which case there is no way for a customer to know
exactly how his web account has been physically distributed within the
cluster.

Following that, you may have one computer in a cluster that is readily
available to serve your markup, but when your UA makes the following
requests for additional resources, these may be physically stored on
some other computer in the cluster that just happens to be busy serving
content to other users and can not allocate the time slots your
resources needs at that time. Your extra resources will be served, but
with a delay.

Or even worse; your markup gets served but the cluster member computer
that holds your CSS document is temporary down for some reason and your
UA ends up waiting for some considerable time for e.g. your CSS
definitions.

Add to that each and every Internet proxy server that may be sitting in
your path between you and your ISP; and these proxies may have a will of
their own too when it comes to serving additional resources to your UA.

Please note that this line of reasoning holds true for all kinds of
extra resources requested from a UA, be that CSS, images, pdf's or
whatever.

The base line is; if you use HTTP requests for to get resources loaded
into your UA you must adopt a "live with the situation" approach.

Various UA's may have been programmed to handle HTTP transaction delays
in more or less convenient ways for the end user but this is nothing
that can be "controlled" by a page author. Don't think of "control" on
the server side either, it will not work good but just add insult to
injury.

--
Rex

[1] I don't think that Digital Equipment was the company that invented
the concept of "computer clusters" but they did run that concept to some
real heights with their VAX/VMS line of computers. A VAX cluster
appeared to the outside world as "one computer" but could in reality be
just about any number of physical machines in various locations.
Jul 20 '05 #5
In message <21**************************@posting.google.com >, Quick
Function <qu******@yahoo.com> writes
Hi, I developed a site and used css. I put almost all style
information in the css and used a lot of "id=my_css_class" in the
html. They is little style specification in the html. I found that on
some computers with slow internet links this seems to be a small
problem. Looks like the html page was loaded first and displayed in a
very ugly layout because the css has not be loaded yet. Then the css
was loaded and the page became beautiful. This may take only one
second but the viewer can see clearly the ugly page. I think it can be
improved. Yahoo uses css and I never saw the ugly page.

Can I ask the css be load first so the ugly page will not be shown? Is
it better to put more style specification in the html file, some thing
like

<table sytle="boder:0px; ...;">
...

Thank you very much.

qq


I assume that you only see this brief flash of un-styled content in
MSIE?

The way around this is to reference a second stylesheet before the main
one.

Looking at one of my own pages, I see:

-------------------------------------------------------------------------
-------

<link rel="stylesheet" href="./newbase.css" type="text/css"
media="screen">

<style type="text/css" media="screen, projection">
<!--
@import url("./new.css");
-->
</style>
-------------------------------------------------------------------------
-------

In this case 'newbase.css' just contains some fairly minimal formatting
for NS4.7x browsers.

So, just insert a reference to a second stylesheet before the main one.
(A near-empty one will do.)

regards.
--
Jake
Jul 20 '05 #6
In message <21**************************@posting.google.com >, Quick
Function <qu******@yahoo.com> writes
Hi, I developed a site and used css. I put almost all style
information in the css and used a lot of "id=my_css_class" in the
html. They is little style specification in the html. I found that on
some computers with slow internet links this seems to be a small
problem. Looks like the html page was loaded first and displayed in a
very ugly layout because the css has not be loaded yet. Then the css
was loaded and the page became beautiful. This may take only one
second but the viewer can see clearly the ugly page. I think it can be
improved. Yahoo uses css and I never saw the ugly page.

Can I ask the css be load first so the ugly page will not be shown? Is
it better to put more style specification in the html file, some thing
like

<table sytle="boder:0px; ...;">
...

Thank you very much.

qq


I assume that you only see this brief flash of un-styled content in
MSIE?

The way around this is to reference a second stylesheet before the main
one.

Looking at one of my own pages, I see:

-------------------------------------------------------------------------
-------

<link rel="stylesheet" href="./newbase.css" type="text/css"
media="screen">

<style type="text/css" media="screen, projection">
<!--
@import url("./new.css");
-->
</style>
-------------------------------------------------------------------------
-------

In this case 'newbase.css' just contains some fairly minimal formatting
for NS4.7x browsers.

So, just insert a reference to a second stylesheet before the main one.
(A near-empty one will do.)

regards.
--
Jake
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Christian Caron | last post by:
Hi all, I have a page which contains the following tag: <head> <meta name="date_modified" content="20030730" /> </head> (...) <script> (...)
6
by: bissatch | last post by:
Hi, I have been tryin to run free dhtml code from a web page. The web page is: http://dynamicdrive.com/dynamicindex14/pixelate.htm When I load the page above it opens as normal and the...
8
by: Andrew Poulos | last post by:
I'm trying to get every tag in a page within a frameset. So far I can get everything but IE 5 to behave by using: // in the frame set window.onload = function() { mypage = window.frames; ......
4
by: jigi via DotNetMonster.com | last post by:
for those who followed my woes yesterday, http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-vc/6571/why-do-i-have-msvcr71-dll-and-msvcr71d-dll-in-my-release-build Now i ran one of the...
3
by: Laszlo Szijarto | last post by:
I want to refresh the text of a label box, say, every second. Is there a way to maintain some kind of persistent connection to the server and the codebehind in order to pull this off or am I...
0
by: Chee | last post by:
Hi all Please forgive me if this has been asked before. I am getting a ThreadAbortException in "Unknown Module" when i try to load a page from VS.NET. One problem is it does not happen all the...
0
by: Erick Lopez | last post by:
When I send my web page to browser in ouput windows recibe this message and the web page the error BC32400 Please Help me Auto-attach to process ' aspnet_wp.exe' on machine 'TABLET'...
10
by: Andy Mabbett | last post by:
(I assume this is the most appropriate group of this; pointers to anywhere more appropriate would be welcome) The Buzzword validator: http://validator.buzzword.org.uk/ says of this page: ...
6
by: Sunfire | last post by:
Is there a way you can test what page is loaded from inside a master page? What I need to do is test to see what page is loaded inside the master page and then gray out the root item linked to that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.