Topic: CSS background (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: iasi, romania |
![]() |
Maniac (V) Inmate From: Boston, MA, USA |
![]() Add it to the body tag in all the pages? No - you add it to the body selector in your style sheet! And I would think that once the browser has cached it for one page it would be instantaneous for every subsequent page. No? |
Maniac (V) Inmate From: under the bed |
![]() On top of the general drawbacks of adding it to the body tag, it wouldn't make it load any faster that way anyway.... |
Bipolar (III) Inmate From: iasi, romania |
![]() Yes, i know adding to the body tag is silly. It is ALREADY added to the body selector in the css file. But it loads strangely when the first page is accessed. |
Maniac (V) Inmate From: Boston, MA, USA |
![]() "But it loads strangely when the first page is accessed." |
Bipolar (III) Inmate From: iasi, romania |
![]() |
Bipolar (III) Inmate From: London |
![]() Have you turned off caching on your browser? Correct me if I'm wrong, but as I understand it, CSS is loaded into the browser and then cached, subsequent views of pages with said style sheet attached will forego any extra loading and use the cached style sheet instead. |
Bipolar (III) Inmate From: iasi, romania |
![]() |
Maniac (V) Inmate From: Boston, MA, USA |
![]() No! You don't want the cache disabled! You WANT the browser to store the style sheet and the background image. The image will probably load noticably slower than the rest of the page content, but only the first time. After that, assuming cache is enabled, the background image should load essentially instantaneously for subsequent pages. |
Maniac (V) Inmate From: Den Haag: The Royal Residence |
![]() link? |
Bipolar (III) Inmate From: London |
![]() Oh, I didn't mean you should turn off the caching, I was asking if you HAD turned off the caching! |
Maniac (V) Mad Scientist From: :morF |
![]() there's a trade-off to be made here... if your background repeats the less you have in the actual file the faster it will load, but the slower it will render and refresh as you scroll... finding the balance will take some testing and playing around. |