MyBB Community Forums

Full Version: Question about the CSS(please assist) :)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When i asked would there be a problem if i called the css from mysql people answered

Quote:If the content of the CSS is in the DB, and you're having to pull it every single page view, it'll add up to a lot of transfer from mysql to php. The query itself may be very fast, but there's limits on how fast the data can be moved around.

Another thing to consider is that you are taking up a PHP process which itself uses 4-5MB of RAM just to serve what is essentially a static file. This reduces how many spare processes you have for other files that have a legitimate need for PHP.
It makes sense to leave the slower, heavier processing for pages that need it, and serve the static content normally as it's faster and lighter.

So do you call the css every time a page loads or u have made it other way??
Sorry for bump but someone?
Some browsers cache CSS. Also it might depend on what headers you send. I prefer no-cache headers so stuff ISN'T cached. I want to make sure anyone viewing the site has the latest content.

CSS inside the file system will probably be a good move.
Inside file system?
And why on this community the css isnt from mysql but from a file(cuz i was looking at 1.2.3 and it was from mysql)
This site uses file system. You can edit the settings in admincp under Server Optimisations. You have to chmod the /root/css folder to 777 first though.
But it can be changed right?
What can be changed? Please be more specific with your questions. Thanks.
You can interchange them at any time in admincp. If you want to make it database and then decide to use filesystem you certainly can. If you then decide you preferred database then just change your admincp setting.

The setting for CSS doesn't effect how your CSS controls are from the admincp. For example if I change the background color...it doesn't matter if you are filesystem or database. Mybb understands where your CSS is stored and updates it appropriately.