Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – how can I manually combine CSS styles?
Tagged: Site Optimization
- This topic has 5 replies, 3 voices, and was last updated 7 years, 8 months ago by ZEOLOU.
-
AuthorPosts
-
March 26, 2017 at 8:00 pm #14132ZEOLOUMember
I’d like to manually combine the multiple Estore styles (Estore, custom css, Extra shortcodes) and only load a single CSS file (my blog stylesheet). I can start by pasting the Estore styles into my own stylesheet but how do I then stop the empty files from being loaded and use the new one?
I’m using the latest version of Estore and WordPress.
March 26, 2017 at 9:04 pm #75372wzpModeratorWhat is the particular reason for doing this?
March 26, 2017 at 10:58 pm #75373adminKeymasterThere are WP plugins which will combine the CSS files. You can give it the list of CSS files that you want combined on your site, and when the page is loading, it will combine those files.
March 27, 2017 at 9:26 am #75374ZEOLOUMemberI need to manually do this without plugins for speed issues. I can copy/paste the Estore styles into my own stylesheet but how do I then stop the empty files from being loaded and use the new one?
I’ve been reading the whole forum for weeks and searching elsewhere for help on all other Estore issues I have but this is the only support I need from you guys.
March 27, 2017 at 12:55 pm #75375wzpModeratorhow do I then stop the empty files from being loaded and use the new one?
I suspect that (website) programming) is not your full-time occupation, and that you read some advice on site optimization, that came up during a Google search.
You would need to use an editor to search/delete all references to .css file loads; in every plugin fike; in every plugin. At which point, you’d have the following NEW problems:
- Whenever you update any of the affected plugins, you’d have to redo all of your modifications.
- CSS styles are interpreted by the user’s browser; not by your server. This means that:
- Currently, only the CSS styles needed for each particular page load or refresh are sent to the user’s browser.
-
I need to manually do this without plugins for speed issues.
By placing every blessed CSS style into one humongous CSS file, you will be forcing the user’s browser to accept and parse, every CSS style; each time a page is loaded or refreshed, even if that particular page only requires 3 or 4 styles.
-
Page load times might actually increase (see above). Not only because of the burden placed on the user’s browser, but by the amount of time needed to transmit (sans browser caching) the “Mega-CSS” file across the Internet.
- Currently, only the CSS styles needed for each particular page load or refresh are sent to the user’s browser.
- CSS styles are hierarchical in nature. You run the risk of loading CSS styles in “the wrong order.” This would increase the difficulty of debugging CSS related issues.
March 28, 2017 at 12:01 pm #75376ZEOLOUMemberI managed to find another solution.
- Whenever you update any of the affected plugins, you’d have to redo all of your modifications.
-
AuthorPosts
- You must be logged in to reply to this topic.