Lack of interest [Suggestion] Combine CSS.php, JS.php etc

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Brandon_R

Guest
I think the files css.php, js.php, images.php and all the other files that does a similar function (ie delivering cachable static content ) should be combined in a more extensible file "static.php" or "cdn.php".

If im mistaken and this isn't the most efficient way of doing this then pardon my ignorance :)
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
I wouldn't personally combine them, I think it is great they are already covering most aspects IE all css is in css.php all js in js.php etc... combining them may become confusing.
 
If they are doing it this way then it's probably for the best then :)

the rgb.php file is a pretty neat thing though :P

The reason i made this request was it seemed weird to make entire new files to perform such small functions.
 
But they perform completely different tasks. I don't see any reason to combine them, nor any benefit.
 
you could combine and minify/gzip the outputs though - that would speed up the site.

i.e. only one css file, one JS file, etc

I think I counted about 11 JS files...

Most of these JS files could be moved to the end of the page too, no real need to have them in the head.
 
you could combine and minify/gzip the outputs though - that would speed up the site.

i.e. only one css file, one JS file, etc

I think I counted about 11 JS files...

Most of these JS files could be moved to the end of the page too, no real need to have them in the head.


I think this is planned... Looking at the HTML source you will see
HTML:
<!-
   <script type="text/javascript" src="js.php?js=js/jquery/jquery.tools.1-2-3.min.js,js/jquery/jquery.easing.1.3.js,js/jquery/jquery.hoverintent.minified.js"></script>
   <script type="text/javascript" src="js.php?js=js/foro/foro.js,js/foro/form.js"></script>

-->

Seems to me this will import all of the current JS files as two files instead.... Not currently in use though as it is commented out
 
If it's using css.php then the output isn't going to be cacheable? I'd prefer to see it rendered as a .css file, so that they can be cached on the local browser and served via a CDN. For sites with a global membership, being able to have cached versions of files served by geographically dispersed CDN servers can make a BIG difference. I'd rather that everyone didn't have to hit our server directly each time for such fundamental and reusable files.

Hrm... I suppose I need to look at it a bit more in firebug, most of the files seem to be static, is it just the css.php that's dynamic?
As long as gzip is enabled I'd imagine most of the .css and .js files would compress fine.
 
The CSS output from css.php is perfectly cacheable by any modern browser. We serve two separate css.php requests, one of which contains the CSS core that every page uses, while the second contains any CSS specifically requested by the page you are viewing. This allows the core to be cached regardless of what other CSS is requested.

As far as the Javascript is concerned, I've been working on merging a bunch of files - I should be able to roll that out here soon, which will hopefully give a nice speed-boost to everyone.
 
The CSS output from css.php is perfectly cacheable by any modern browser. We serve two separate css.php requests, one of which contains the CSS core that every page uses, while the second contains any CSS specifically requested by the page you are viewing. This allows the core to be cached regardless of what other CSS is requested.

As far as the Javascript is concerned, I've been working on merging a bunch of files - I should be able to roll that out here soon, which will hopefully give a nice speed-boost to everyone.

I think that deserves a - Whoop !
 
Thx Kier!
I was looking at the net tab in firebug and both the css.php requests were returning 304 not modified as you said.
Having a lot of the files combined will certainly make it a lot better for reducing the number of requests.

Might I suggest having a production option where the files are combined/minified and a debug option where the files are broken out and have all their comments in place to make debugging and screen layout tweaking easier? It's invaluable to be able to see everything when modifying things (as we all know). :)
 
I've just rolled out the merged JS and improved CSS here... you may well notice a significant speed boost to page-loads now.
 
I've just rolled out the merged JS and improved CSS here... you may well notice a significant speed boost to page-loads now.

I am seeing the merged CSS calls but the JS are not merged. Did you revert the change?
 
Top Bottom