i would like to prevent corev4.css from loading for a public site (100% anonymous) to reduce pages size. any suggestions please ?
|
|
There is no way to accomplish this in a way that suits your goal. SharePoint will always add its CSS to each page. You could remove it client-side, but that doesn't solve your issue of reducing page size. For public-facing sites, I have used Aptimizer (now owned by Riverbed): http://www.riverbed.com/us/products/stingray/stingray_aptimizer.php Tools like Aptimizer compress, consolidate, etc., everything at the IIS level. Might be worth a shot. |
|||
|
|
|
I don't think it's 'impossible', because there is the
control in the master page which you can conditionally replace with other kinds of references to stylesheets you need on your publishing site. |
|||||
|
|
You need to make a custom control which inherits CssLink, and in that you need to make some logic which prevents the COREV4.css to be loaded based on some condition.
|
|||
|
|
|
Why can't you create a custom master page and remove the < SharePoint:CssLink runat="server" Version="4"/> from the markup? SharePoint will then not add the css file to the request and you will get a much "lighter" page. But then every out of the box control's css will have to be re-entered from your branding project in any case you are using the out of the box controls. If you are making a public facing site the I assume that you have a custom master page and custom page layouts anyways and you are not in need of all the css that's inside of SharePoint? |
|||
|
|
