Reply
CSS linked or not linked?!
Old 04-02-2007, 04:34 PM CSS linked or not linked?!
The PHP Professor

Posts: 308
Name: Alex
Location: Behind You
What is best for a CSS, if you link it or you have it included with the page?
I hear included with the page is better because it doesnt have to grab the stuff from the file, What do you prefer?
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
Need a FILE host? Nobody gets it done right like 1Stopupload.com!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
When You Register, These Ads Go Away!
Old 04-02-2007, 07:03 PM Re: CSS linked or not linked?!
Skilled Talker

Posts: 61
Name: Daniel
Personally I prefer to have them linked to an external file. That way if you have multiple files on one website. One changes goes sitewide; instead of having to change every file separately.
castis is offline
Reply With Quote
View Public Profile
 
Old 04-02-2007, 09:22 PM Re: CSS linked or not linked?!
Tom_M's Avatar
Ultra Talker

Posts: 251
Name: Tom Maurer
Location: Pennslvania, USA
External files is the way to go. Separate your style from the structure. That's is the whole point of css.
Tom_M is offline
Reply With Quote
View Public Profile
 
Old 04-02-2007, 10:26 PM Re: CSS linked or not linked?!
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
External. It allows the page to load more quickly (since CSS files can be cached) and since, as Tom said, it separates layout from content.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 04-05-2007, 09:38 AM Re: CSS linked or not linked?!
willcode4beer's Avatar
Webmaster Talker

Posts: 696
Name: Paul Davis
Location: San Francisco
Linked vs. Internal

Internal:
First request loads faster (avoiding 2nd http request)
Every other page loads the same (no caching)
Maintenance is greater (need to maintain duplicate content in many pages)
Bigger pages = more bandwidth consumed

External:
After the first request every other page loads faster (smaller, using css from cache)
Easier maintenance (single point of change)
Modular
Cheaper, fewer http requests = less bandwidth cost


Something else to consider, with the number of bots running around the net (my site gets about 300 different bot visits daily), for search, aggregation, student projects, etc; you may find that by embedding a large amount of CSS that bots could add quite a bit to your bandwidth. Most bots won't load external files so, keeping them external could save you quite a bit here.
I know some people who use CSS to put images in their site to take advantage of this and prevent many bots from slurping their images (saving even more bandwidth). Personally, I think its overkill but, something to consider.
__________________
Paul Davis
willCode4Beer.com (coding for all the right reasons)
willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS linked or not linked?!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12459 seconds with 12 queries