Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



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

Posts: 340
Name: Alex
Location: Behind You
Trades: 0
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!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
 
Register now for full access!
Old 04-02-2007, 07:03 PM Re: CSS linked or not linked?!
Skilled Talker

Posts: 62
Name: Daniel
Trades: 0
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: 250
Name: Tom Maurer
Location: Pennslvania, USA
Trades: 0
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,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
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
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
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.
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS linked or not linked?!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





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



Page generated in 0.17524 seconds with 12 queries