Enable Browser Caching with cPanel Includes Editor
Enable browser caching to reduce website loading times, by taking advantage of caching of specific file types in the web browser.
For server administrators of cPanel VPS or Dedicated servers (with root level access), this can be achieved on a server-wide basis by using the Apache Includes Editor in WHM.
From WHM admin, as root user, navigate to Server Configuration -> Apache Configuration -> Includes Editor. Find the "Post Virtual Include" entry and select "All Versions" from the dropdown menu.
Click save. To enable browser caching of a specific website, simply add the following line to the .htaccess file of the document root:
RewriteRule ^(css|js)/(.*)\.[0-9]+\.(.*)$ /$1/$2.$3 [L]
To automatically enable browser caching for all users and websites, add an .htaccess file with the above line of text to the cPanel Skeleton directory.
The specified file types will now be cached in web browsers to prevent loading on every access. This will speed up the website loading time, while simultaneously reducing the server workload and bandwidth usage.
For alternative methods of enabling browser caching, see Enable Browser Caching with .htaccess File (enables browser caching on a per-site basis for shared hosting and reseller administrators).
Was this answer helpful?
Reference this guide for help with mass find and replace file manipulation in Linux servers.Find...
This article explains the method of changing the root password on a Linux Server using SSH. SSH...
On the Linux systems there are three standard commands that show the information about last...
This article explains the process of binding multiple IP addresses to the Network Interface Card...