28 May 2026 ⢠7 min read
Boosting E-Commerce Performance: How Webskyne Reduced Page Load Time by 65% Using Next.js and AWS
Webskyne partnered with a mid-sized e-commerce retailer struggling with slow page loads and high bounce rates. By migrating their storefront to Next.js, leveraging AWS CloudFront for global CDN distribution, and implementing advanced image optimization and server-side rendering strategies, the team achieved a 65% reduction in average page load time. Core Web Vitals scores jumped from failing to exceeding thresholds, organic traffic increased by 22%, and conversion rates rose by 15%. This case study details the technical challenges, architectural decisions, and measurable outcomes of the performance overhaul.
Case StudyPerformance OptimizationNext.jsAWSE-commercePage SpeedCore Web VitalsReactCloud Architecture
# Boosting E-Commerce Performance: How Webskyne Reduced Page Load Time by 65% Using Next.js and AWS
## Overview
In early 2026, a growing direct-to-consumer brand approached Webskyne with a pressing problem: despite strong marketing campaigns and a loyal customer base, their online store suffered from sluggish performance. Page load times averaged 5.8 seconds on mobile, well above the 3-second threshold that studies show leads to significant abandonment. Bounce rates hovered near 45%, and the storeâs Core Web Vitalsâparticularly Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS)âwere consistently in the "needs improvement" or "poor" range according to Googleâs PageSpeed Insights.
The existing stack relied on a traditional PHP-based monolith with a customized Shopify Plus frontâend, hosted on a single regional server. While functional, the architecture lacked modern optimization techniques such as incremental static regeneration, edge caching, and automatic image format selection. The clientâs goals were clear: cut load time in half, improve search visibility, and create a scalable foundation for future feature development without disrupting ongoing sales.
Webskyne proposed a performanceâfirst rebuild using Next.js 13 with the App Router, React 18, and a suite of AWS services including CloudFront, S3, Lambda@Edge, and DynamoDB for session storage. By adopting a Jamstackâinspired approach while retaining serverâside rendering for personalized content, the team aimed to deliver fast, secure, and globally available experiences.
Over a 12âweek engagement, Webskyne migrated product catalog pages, collection grids, and the checkout flow to the new platform. The result was a 65% reduction in average page load time (from 5.8âŻs to 2.0âŻs), LCP dropping from 4.9âŻs to 1.8âŻs, and CLS improving from 0.12 to under 0.01. Organic search traffic rose 22% within six weeks, and conversion rates increased by 15%, translating to a measurable revenue uplift.
## Challenge
The legacy storefront faced several interconnected performance bottlenecks:
1. **ServerâSide Rendering Overhead**: Every request hit a PHPâFPM process that rendered HTML serverâside, queried a MySQL database for product data, and applied multiple layers of theme hooks and plugins. This process added 1.2â1.8âŻseconds of pure server latency even before network transfer began.
2. **Unoptimized Asset Delivery**: Images were served at original resolutions (often 2000+âŻpx wide) regardless of device screen size, and no modern formats like WebP or AVIF were used. JavaScript and CSS bundles were monolithic, containing code for features not used on the current page.
3. **Lack of Edge Caching**: The singleâregion hosting meant that users far from the server experienced high TCP handshake and TLS negotiation times. Static assets were not cached at the edge, forcing each visitor to download the same resources from the origin.
4. **RenderâBlocking JavaScript**: Theme scripts and thirdâparty widgets (chat, reviews, analytics) loaded synchronously in the document head, delaying the first paint.
5. **Layout Instability**: Dynamic injection of banners and promo bars caused frequent layout shifts, hurting CLS scores.
6. **Limited Scalability**: During flash sales, the monolith struggled to scale horizontally, leading to occasional 502 errors and slowed response times.
These issues combined to produce a poor user experience, especially on mobile networks, and negatively impacted SEO rankings because Google penalizes slowâloading pages.
## Goals
Webskyne and the client defined the following measurable objectives for the performance overhaul:
- **Reduce average page load time** (as measured by Web Vitals in Chrome UX Report) from 5.8âŻseconds to under 2.5âŻsecondsâa reduction of at least 55%.
- **Achieve "Good" Core Web Vitals** across LCP (<2.5âŻs), FID (<100âŻms), and CLS (<0.1) for at least 75% of page views.
- **Increase organic search traffic** by 20% within three months of launch, attributing gains to improved page experience signals.
- **Boost conversion rate** (completed purchases per session) by 10% relative to the baseline.
- **Maintain or improve** existing functionality, including personalized recommendations, cart persistence, and thirdâparty integrations (email marketing, analytics, live chat).
- **Ensure scalability** to handle traffic spikes of up to 10Ă average load during promotional events without manual intervention.
- **Reduce operational overhead** by moving to a managed, serverlessâfriendly architecture that minimizes patching and scaling concerns.
## Approach
Webskyne adopted a performanceâcentric redesign guided by the RAIL model (Response, Animation, Idle, Load) and the Core Web Vitals framework. The plan unfolded in five phases:
1. **Audit and Baseline**: Using Lighthouse, WebPageTest, and realâuser monitoring (RUM) via Google Analytics, the team captured detailed performance metrics for each template type (home, product, collection, cart, checkout). This baseline informed prioritization.
2. **Architectural Design**: The new stack combined Next.js 13 (App Router) for hybrid rendering, AWS S3 for immutable asset storage, CloudFront for global CDN distribution, Lambda@Edge for requestâlevel rewrites and header injection, and DynamoDB for session storage. A GraphQL layer (hosted on AWS AppSync) aggregated product data from the existing ERP via REST endpoints, allowing the frontend to fetch only needed fields.
3. **Incremental Migration**: Rather than a bigâbang rewrite, Webskyne migrated templates one by one, starting with highâtraffic pages (homepage and topâselling product pages). Each migrated page lived alongside the legacy version behind a feature flag, enabling A/B testing of performance and user behavior.
4. **Optimization Implementation**: Key techniques included:
- Automatic image optimization via Next.js Image component with responsive sizes, modern formats (WebP/AVIF), and priority props for aboveâtheâfold images.
- Static generation (SSG) for product listings and collection pages, revalidated incrementally (ISR) every 5âŻminutes.
- Serverâside rendering (SSR) for personalized cart and checkout pages, with caching strategies for userâspecific data.
- JavaScript and CSS code splitting at the route level, eliminating unused payloads.
- Critical CSS extraction and inline injection for aboveâtheâfold content.
- Lazyâloading of offscreen images and thirdâparty embeds.
- Use of `rel=preconnect` and `rel=preload` for fonts and critical thirdâparty scripts.
- Edgeâside caching of API responses via Lambda@Edge, reducing origin fetches.
5. **Testing, Monitoring, and Rollout**: Performance budgets were enforced via automated Lighthouse CI in pull requests. Realâuser monitoring continued postâlaunch to validate improvements. After a twoâweek parallel run, the legacy frontend was decommissioned.
## Implementation
### Frontend Framework
The team chose Next.js 13 with the App Router to leverage React 18âs concurrent features and streamlined data fetching. Pages were organized as follows:
- **app/** directory containing routeâspecific layouts, loading states, and error boundaries.
- **components/** for reusable UI elements (buttons, cards, modals).
- **lib/** for utility functions, GraphQL client initialization, and image transformation helpers.
### Data Layer
Product data remained in the clientâs ERP system. Webskyne built a thin GraphQL wrapper on AWS AppSync that:
- Exposed queries for `products`, `collections`, `categories`, and `reviews`.
- Applied response caching (TTL 2âŻminutes) to reduce ERP load.
- Integrated with Amazon Cognito for user authentication, enabling personalized pricing and wishlist features.
### Asset Optimization
All images were uploaded to an S3 bucket. The Next.js Image component was configured with a custom loader that signed URLs via CloudFront key pairs, ensuring secure, cached delivery. Image widths were generated automatically for breakpoints 640, 768, 1024, 1280, and 1920âŻpx, with quality set to 80 for WebP and 85 for AVIF.
### Caching Strategy
- **Static Pages**: ISR with revalidation intervals of 5âŻminutes for collection pages and 60âŻminutes for blogâstyle content.
- **UserâSpecific Pages**: SSR with `staleâwhileârevalidate` headers (stale 30âŻseconds, revalidate 60âŻseconds) served via CloudFront, allowing edge caching of the shell while fetching fresh user data from DynamoDB.
- **API Responses**: Lambda@Edge intercepted GraphQL responses, added `Cache-Control: public, maxâage=120`, and stored them in CloudFrontâs edge cache for two minutes.
### Code Splitting and Bundle Optimization
Using Next.jsâs automatic routeâbased splitting, each page downloaded only the JavaScript necessary for its initial render. Dynamic `import()` was used for nonâcritical widgets (e.g., live chat, product reviews), loading them on interaction. The total initial bundle size dropped from 1.2âŻMB (legacy) to 280âŻKB (gzipped).
### ThirdâParty Scripts
To mitigate renderâblocking, thirdâparty scripts were loaded via `
