Current time: 04-24-2014, 10:58 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why are not the CSS externs?
05-07-2006, 10:01 PM
Post: #1
Why are not the CSS externs?
Hi

Why the Style Sheets in all the Software forums, is generated in each page instead of can be generated in a files css externs???

Is because would give more load in the server??

Regularly with a


PHP Code:
<LINK HREF="file.css"

the visitants have faster downloads than using

PHP Code:
<STYLE>
BODY{...}
</
STYLE

Regards
Find all posts by this user
Quote this message in a reply
05-07-2006, 10:03 PM
Post: #2
RE: Why are not the CSS externs?
I think it's all stored in a database. It technically is external because it pops out a stylesheet from css.php when you give it an argument for a specific theme.
Find all posts by this user
Quote this message in a reply
05-08-2006, 12:02 AM (This post was last modified: 05-08-2006 12:02 AM by Augustino.)
Post: #3
RE: Why are not the CSS externs?
I know than all is stored in the database, the which give better performance, but the question is Why not are auto-generated diferents files,css , for each page
Find all posts by this user
Quote this message in a reply
05-08-2006, 05:12 AM
Post: #4
RE: Why are not the CSS externs?
That would actually be fairly easy. For a mass-blog system I had a style.php file that would take a user account and subsection as parameters and output the correct CSS. When I came across a problem since Firefox demanded that it was text/css, I just did

Code:
header('Content-Type: text/css');

And I was done. So yeah. No idea why exactly I posted that. Just that it's easy Smile
Find all posts by this user
Quote this message in a reply
05-08-2006, 09:53 AM
Post: #5
RE: Why are not the CSS externs?
That's what mybb is using though.
However, storing CSS should be up to the browser, FF is storing CSS files.
Find all posts by this user
Quote this message in a reply
05-08-2006, 10:00 AM
Post: #6
RE: Why are not the CSS externs?
Implemented.
Users can now choose between retrieveing css from a text file and the database.
The CSS is still stored and modified from the database, but 'normal' users will only ever use the standard text files if you decide to use text file css.

CSS embedded in HTML documents (using style tags) is a bad idea. It increases HTML download times and your own bandwidth! This can add up to quite a lot depending on the size of the CSS used. Imagine a 3kb increase per page load for thousands of users on your site... External css can be cached by the browser.

Updated Site!
My mods
1.1: MyBB Zip Installer, Easy Install v2.0, Cash/Points plugin, PayPal/Subscriber, Reply by email, Advanced Plugins
Find all posts by this user
Quote this message in a reply
07-27-2006, 01:45 AM
Post: #7
RE: Why are not the CSS externs?
I know this is an old topic but it hits on an improvement. Speaking of loading times, wouldn't it be quicker to load the css from a flat-file rather than a database query, especially since hosts usually watch database queries a lot closer than it looks after how people load HTML pages?

I just think it would be a good idea to use a flat-file system in future versions just to prevent the unnecessary queries to the database.

[Image: signature.gif]
Find all posts by this user
Quote this message in a reply
07-27-2006, 06:17 AM
Post: #8
RE: Why are not the CSS externs?
SnakEyez Wrote:I know this is an old topic but it hits on an improvement. Speaking of loading times, wouldn't it be quicker to load the css from a flat-file rather than a database query, ...
Yes, and MyBB 1.2 has that feature. Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
08-12-2006, 05:36 PM
Post: #9
RE: Why are not the CSS externs?
You can choose between flat-file or database querying
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication