Understanding client-side vs server-side display modes in Magento 2.x and their impact on PureClarity recommendations
PureClarity offers two distinct display modes for rendering recommendations in Magento 2.x. Understanding these modes helps you choose the best approach for your specific requirements and technical constraints.
Recommended for: Most standard implementations Processing location: PureClarity servers Template management: PureClarity admin consoleIn client-side mode, all recommendation data and HTML rendering occurs on PureClarity’s servers. When a customer visits your site, JavaScript requests recommendations directly from PureClarity and displays them in real-time.How it works:
Page loads with PureClarity JavaScript
Recommendations requested from PureClarity servers
Complete HTML returned and inserted into zones
No additional Magento processing required
Advantages:
Faster page loads - No server-side processing delays
Reduced server load - Offloads recommendation processing
Real-time updates - Content changes immediately in PureClarity admin
Global CDN delivery - Fast content delivery worldwide
Simplified implementation - No complex server-side customizations
Client-side mode is the standard implementation and works well for most e-commerce sites without complex pricing rules or customer-specific restrictions.
Recommended for: Complex pricing, custom restrictions, or advanced customizations Processing location: Your Magento server Template management: Magento templates with PureClarity dataIn server-side mode, PureClarity provides product SKUs and recommendation logic, but Magento handles the final data assembly and HTML rendering using current store data.How it works:
Page loads and triggers server-side recommendation request
PureClarity returns SKUs and recommendation metadata
Magento processes SKUs with current pricing, inventory, and rules
Custom templates render final HTML with live data
Complete recommendations inserted into page
Advantages:
Live pricing integration - Real-time price calculations
Customer-specific data - Personalized pricing and availability
Complex business rules - Custom logic and restrictions
Full template control - Complete customization of appearance
Inventory accuracy - Current stock levels reflected
Server-side mode requires additional development work and may impact page load performance. Use only when client-side mode cannot meet your requirements.
Start with client-side mode unless you have specific requirements that demand server-side processing. You can always migrate to server-side mode later if needed.