SolidSeoVPS – 2GB Seo VPS $14.95 / Dedicated Server Starts @ $49.95

—The Most Powerful SEO VPS is HERE—

Meet Solid

All our vps comes with lighting fast 1000mbit, Unmetered Bandwidth, Much more storage space and powerful spec. than any other provider, and of course UNBEATABLE PRICE

Newbie Package Only $ 19.95 month

• CPU: 3.4GHZ
1GB DDR3 Dedicated RAM
• 75GB…

SolidSeoVPS – 2GB Seo VPS $ 14.95 / Dedicated Server Starts @ $ 49.95

Magento 2 – CMS Specific page_layout XML and Dedicated page_layouts in general?

I’m looking for some BEST PRACTICES insight into using page_layout.xml. Is it a good idea to try and decouple the non-shared resources on Product Pages, Category Pages and CMS Pages? If so, what’s the best way to do this? Recently found myself creating a bunch of CMS specific CSS rules for our CSM pages and I knew the CSS rules may continue to grow a bit so I decided to create a dedicated layout file (Magento_Theme\page_layout\cms_layout.xml). To achieve this, I created a new page_layout but also had to make a plugin beforeRenderResult() to load in in <body> BOTH the standard class page-layout-2columns-left and the new class page-layout-cms-layout. If I didn’t do this, I would have had to modify a lot of CSS.

Some of the benefits I think I’m realizing are:

  • (Maintenance) I no longer have to manage a lot of Content > Page > Design > Layout Update XML content. I can just change the “Layout” dropdown to the CMS Specific Layout.
  • (Slight Performance) I don’t have to load the CSS for the CMS pages on the Product Pages and Category Pages

Next up – might be to look at some of the heavy UI JS/CSS being used on Product Pages and not have that being loaded on Category Pages? Does this situation make sense to experiences Magento Developers OR should I provide more clarity?

I’m pretty certain I’m not making any big performance gains with this particular situation but I am curious whats “Best Practice”. As it stands, it seems like Magento load the the entire websites resources on every page, no matter how big or small (Category JS/CSS, Details JS/CSS, Checkout JS/CSS, etc). I’m not sure that’s great either.