LibreSpeed now supports switching between the classic design and the new modern design.
By default, LibreSpeed uses the classic design (located in index-classic.html).
index.html - Entry point (lightweight switcher)index-classic.html - Classic design at rootindex-modern.html - Modern design at root (references assets in subdirectories)frontend/ - Directory containing modern design assets (CSS, JS, images, fonts) - kept for non-Docker deploymentsIn Docker deployments, the frontend assets are flattened to root-level subdirectories:
index.html - Entry point (lightweight switcher)index-classic.html - Classic designindex-modern.html - Modern designstyling/ - CSS files for modern designjavascript/ - JS files for modern designimages/ - Images for modern designfonts/ - Fonts for modern designfrontend/ directory - Assets are copied directly to root subdirectories✅ Both designs at same level - no path confusion
✅ results/ accessible from both designs with same relative path
✅ backend/ accessible from both designs with same relative path
✅ No subdirectory nesting issues
✅ Clean separation of concerns
✅ Docker containers have no frontend/ parent directory
The feature switch uses modern JavaScript features (URLSearchParams, fetch API). It is compatible with all modern browsers. The new design itself requires modern browser features and has no backwards compatibility with older browsers (see frontend/README.md).
There are two ways to enable the new design:
Edit the config.json file in the root directory and set useNewDesign to true:
{
"useNewDesign": true
}
This will make the new design the default for all users visiting your site.
You can override the configuration by adding a URL parameter:
http://yoursite.com/?design=newhttp://yoursite.com/?design=oldURL parameters take precedence over the configuration file, making them useful for testing or allowing users to choose their preferred design.
index.html file (lightweight redirect page)index-classic.html at rootindex-modern.html at root (references assets in frontend/ subdirectory)frontend/ subdirectoryindex.html file (lightweight redirect page)index-classic.html at rootindex-modern.html at root (references assets in root subdirectories)styling/, javascript/, images/, fonts/)frontend/ directory - Assets are flattened to root levelBoth designs are at the same directory level, ensuring that relative paths to shared resources like backend/ and results/ work correctly for both.
The feature switch is implemented in design-switch.js, which is loaded by the root index.html. It checks:
?design=new or ?design=old)config.json configuration fileindex-classic.html or index-modern.htmlBoth design HTML files are at the root level, eliminating path issues.
The modern design references assets from the frontend/ subdirectory (e.g., frontend/styling/index.css), while both designs can access shared resources like backend/ and results/ using the same relative paths.
In Docker deployments, the frontend/ directory is flattened during container startup. Assets are copied directly to root-level subdirectories (styling/, javascript/, images/, fonts/), and index-modern.html references these root-level paths. This eliminates the frontend/ parent directory in the container.