| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Group all CSS into one file | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Group all CSS into one file
I'm trying to reduce the number of requests the site is making. One possible idea is to make one CSS file that is used for every page. It might be a little more data than the current system of serving CSS based on the page but once it's cached then it won't be a problem.
I've also noticed this in one of the page speed testers... Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources: One inelegant solution is to scan the site for all the CSS files, remove the ones that are from modules that aren't used. Minify them all and then include in the template as a static CSS file. Anyone have a better plan?
__________________
Core version: 5.5.xx |
|||||||
|
#2
|
|||||||||
|
|||||||||
Re: Group all CSS into one file
Is the "Aggregate CSS files" setting enabled in your store? It is supposed to do what you describe:
http://kb.x-cart.com/en/setting_up_x-cart_5_environment/speeding_up_your_store.html#step-1-enable-css-js-a...widget-caching
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Group all CSS into one file
Quote:
Sort of does it, but check out the number of files.. <link href="http://firemouth.co.uk/xcart5test/var/resources/css/http/all/5b0fe15624457dd1ac0b7dab2e733879df8f679c2915c293d6 ec30a9679d409b.css?1487706193" rel="stylesheet" type="text/css" media="all" /> <link href="http://firemouth.co.uk/xcart5test/var/resources/default/http/screen/892dc82e328e0c690b100ea39235394f.css?1487706193" rel="stylesheet" type="text/css" media="screen" /> <link href="http://firemouth.co.uk/xcart5test/var/resources/default/http/screen/4e0530c04002109470a4b7631f9a73e6.css?1487706193" rel="stylesheet" type="text/css" media="screen" /> <link href="http://firemouth.co.uk/xcart5test/var/resources/css/http/all/b0c695f19851c08dfee36612b817433aee44091c724005b800 bbc6be263bf622.css?1487706193" rel="stylesheet" type="text/css" media="all" /> <link href="http://firemouth.co.uk/xcart5test/var/resources/css/http/print/1ec3db6a62c0d145e11d908cad5e8d68368fb1f59a645ffea3 edbe7144cb5932.css?1487706193" rel="stylesheet" type="text/css" media="print" /> Ideally there should be two. One for 'all' and one for 'print'. The other problem is there is multiple CSS files on the server which I'm guessing is for different page types (category, product etc) which is a clever system but ultimately I believe makes the site slower as each page the user visits has potentially a new stylesheet or two.
__________________
Core version: 5.5.xx |
|||||||
#4
|
|||||||
|
|||||||
Re: Group all CSS into one file
Quote:
It is definitely true in general but there are always some limitations. In fact, typical X-Cart theme css content is very large (even aggregated and minified) to download and the most part of it would be redundant on some specific page. That is why X-Cart splits all css which is needed to display the page in two parts - one part is common for any page, and second is related to this specific page. Such system allows to cache the common part and download only the smaller, dynamic part, so that's no different from single site stylesheet.
__________________
Eugene Dementjev XC5 Developer |
|||||||
#5
|
|||||||
|
|||||||
Re: Group all CSS into one file
We always have used "Aggregate CSS files" and it does help but nothing is ever perfect as X-Cart often use Google as a yardstick (!) We've said previously that we're not big fans of Google, but their Page Speed tests do show some of these issues in more detail, albeit 'above the fold' related issues, which also differ between Desktop and Mobile devices...
On our Dev Store, we're reasonably close to solving it. Only 1 CSS issue (Optimize CSS Delivery) left on the Desktop test but 5 CSS issues (Optimize CSS Delivery) and 1 JS issue (Remove render-blocking JavaScript) still left on the Mobile test It would show some great XC5 product design awareness skills, if these scores were the other way around, as Mobile surpassed Desktop as a top purchase device some time ago (in the UK anyway). We'll carry out the same changes to our live store so that's up to speed too, but may wait until XC 5.3.3, because we don't want to do everything twice!
__________________
Dev Store & Live Store XC Business 5.4.1.35 Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33 |
|||||||
#6
|
|||||||
|
|||||||
Re: Group all CSS into one file
Warning - Off Topic!
Mobile -v- Desktop Acid Test - Out of 28 orders yesterday, here is a breakdown Desktop = 24 Mobile = 3 Tablet = 1 I *think* that whilst being Desktop -v- Tablet -v- Mobile aware is important, it is not the only "Holy Grail". Likewise speed is important but again (IMHO) not the only "Holy Grail". It is all about Content - Responsive - Speed. Just my two cents (pence) I'll get my coat! Kind regards ITVV
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
#7
|
|||||||
|
|||||||
Re: Group all CSS into one file
Quote:
Secondhand tea caddy sales in Barnsley don't count as mainstream data..... Quote:
Quote:
Quote:
Quote:
__________________
Dev Store & Live Store XC Business 5.4.1.35 Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33 |
|||||||
|
#8
|
|||||||
|
|||||||
Re: Group all CSS into one file
Lancashire -v- Yorkshire I like tea bags and I hate 'muck' Regards ITVV
__________________
X-Cart Pro 4.7.12 Active and working great with reBOOT-reDUX X-Cart Pro 4.6.6 Retired after 6 years of first class service X-Cart Pro 4.1.7 Retired after 9 years of first class service Apache: 2.4.25 PHP: 7.4.5 MariaDB: 10.1.44 Arch: x86_64 |
|||||||
|
#9
|
|||||||
|
|||||||
Re: Group all CSS into one file
This tool has got my critical desktop CSS loaded in the head. Need to get mobile in there as well.
https://jonassebastianohlsson.com/criticalpathcssgenerator/
__________________
Core version: 5.5.xx |
|||||||
#10
|
|||||||
|
|||||||
Re: Group all CSS into one file
Quote:
Having joked with @ITVV we then analysed our own orders since 1/1/17 afterwards and mobile orders do lead desktop orders, only slightly though.... 54% v 46% but iPads and some tablets count as mobile too in that data, because of their non desktop OS. 'Mobile First' coding is definitely becoming more and more accepted now in many new software releases elsewhere, as we said previously.
__________________
Dev Store & Live Store XC Business 5.4.1.35 Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33 |
|||||||
|
|||
X-Cart forums © 2001-2020
|