SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
-
Sep 22, 2006, 21:00 #1
- Join Date
- Aug 2006
- Location
- Australia
- Posts
- 331
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is there a way to make the external css load before any of the content
Hi Guys and Gals,
Just wondering if anyone knows how to make the external css layout styling load before any of the content. That includes background images etc.
I'm wanting the rounded corners to show up on a box before any of the content shows up within that box. The rounded corners are external css background images.
Look forward to your feedback.
Thanks
-
Sep 22, 2006, 21:07 #2
Well, that's kind of a loaded question... There is a way, but it's generally frowned upon - a splash screen wrapper.
If you direct your users to a splash screen on 'first load' to your site that loads the CSS and precaches all the images, when it redirects to the final page it's all in the cache, so loads quicker...
Not a 100% solution, but about as close as you're gonna get.
-
Sep 23, 2006, 05:23 #3
- Join Date
- Aug 2006
- Location
- Australia
- Posts
- 331
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hmmmm, you're right it's not an ideal solution…but I'll certainly keep it in mind.
Anyone else got any other ideas on the situation?
-
Sep 23, 2006, 05:40 #4
- Join Date
- Oct 2005
- Location
- Brisbane, QLD
- Posts
- 4,067
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Not that I'd recommend doing it this way but you could set the CSS of the element holding your main content to display: none and then write a script that detects when the page is fully loaded before then resetting the display of the element to block.
-
Sep 23, 2006, 07:53 #5
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Why bother
If I see nothing on a page even for a couple of seconds then I'm offif I see an icon that says page loading then I'm off somewhere else even quicker.
As for splash screens then just don't go there
Users these days know that pages load sequentially and I find if comforting to see something load straight away rather than when old fashioned tables are used and things have to wait until the table has loaded (even though you can add table-layout:fixed to stop this process).
The benefit of css is that it doesn't wait for the images to be loaded and gives the user the important content first. I don't want to see a round corner first Id rather see the answer to my search/question and then I can decide to wait for the pretty background or not.
You seem to be wanting the opposite of what the user wants and that is content first.
-
Sep 23, 2006, 10:40 #6
Originally Posted by Paul O'B
-
Sep 23, 2006, 11:07 #7
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
It would be kind of nice to have the option to grab the CSS first BEFORE even attempting to render the html.
However that behaviour is usually caused by images in the html not having their dimension set and then the browsers re-adjusting afterwards.
I guess there is just no pleasing everyone
-
Sep 23, 2006, 12:06 #8
Originally Posted by Paul O'B
Of course, that it takes a filesystem corruption or hardware failure to get linux to do that, while all it takes on a windows server is excessive traffic...
How's the old saying go? *nix is for servers, windows is for desktops, and never shall the 'twain meet?
No wait, that's right. It's *nix is for servers, windows is for desktops, the internet is for P0RN, and I like corm.
Bookmarks