Lack of interest Allow an external URL for css as well

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.
This suggestion has been closed. Votes are no longer accepted.
I suggest a config option $config['cssUrl']. This could be used to load css.php through a CDN service, which in turn would use the XenForo install as it's backend.

This would allow CSS, like JavaScript and data, to be cached and served by a CDN for speedy delivery.
I tried it, and sadly... The issue is that the CSS can have conditionals, and those can be per user...
And that makes it uncacheable
 
I tried it, and sadly... The issue is that the CSS can have conditionals, and those can be per user...
And that makes it uncacheable

Well that's a true pitfall indeed. A very odd design decision.

Quickly looking at the base CSS files that are always included (xenforo,form,public) and I couldn't find anything user specific in those or the CSS files they include, so at least those can be served from CDN.

In fact I have edited the PAGE_CONTAINER to include the css.php?css=xenforo,form,public CSS through CDN, and everything seems to work as expected.
 
I think it might not be that bad actually ...
Even thought there is a *potential* for it to be used, it does not seem to be exploited currently, I did a quick

Code:
select title,template from xf_template where title like '%.css' and template like '%\$visitor%';

And that returned 0 rows, which means the visitor is not being inspected for custom styles.

A different story is with xen:if

Code:
select title,template from xf_template where title like '%.css' and template like '%xen\:if%';
.....
57 rows returned

However, must of them are something like
<xen:if is="{xen: property enableResponsive}">

And since that is NOT user configurable but in the style itself, it would always return the same value.

I liked your first post, I think this should be an option in the same way we can localize external data through a CDN.

May I ask which CDN you are using?
 
That's pretty much what I found as well. There's nothing completely dynamic in the styles at least for the time being or in the styles we are using. I don't think there should be even. For example it might be tempting to highlight followed users using dynamic CSS definitions.

We are currently using EdgeCast as our CDN provider, and have been quite happy with them.
 
Top Bottom