First, let’s discuss what is static content. There are few files which never change as per request, files like images, CSS, js, videos etc. In other words, files that are not used to build dynamic content like PHP, aps(x), JSP. The benefits to removing the cookies from static content are it will reduce the total size of requests made to build the web pages and makes them load faster. Removing the cookies from the request header is one of the performance settings needed to speed up your site. Remember that you still need to cache and compress some files.
First edit or create a .htaccess file on the documentroot of you domain which you want to make cookieless domain. This method will work only with Apache web servers. Add below code in .htaccess file.
# vim /var/www/html/techoism/.htaccess
# Use Mod_deflate to compress static files
# Speed up caching
FileETag MTime Size
ExpiresDefault "access plus 366 days"
# Future Expires Headers
Header set Expires "Sat, 27 Dec 2018 23:59:59 GMT"
I hope this article will help you to setup the cookieless domain.