News

May 16, 2011

Faster static content


To improve site performance, Serveriem.LV is coming up with a unique feature, which none of the hosting providers in Latvia support: separate domain for static content (cookie-free domain). This is the way most popular web services, such as youtube, paypal, amazon, yahoo and similar, improve their page load time.

To improve site performance, Serveriem.LV is coming up with a unique feature, which none of the hosting providers in Latvia support: separate domain for static content (cookie-free domain). This is the way most popular web services, such as youtube (ytimg.com) paypal (paypalobjects.com), amazon (image-amazon.com), yahoo (yimg.com) and similar, improve their page load time.

This is the continuation of our previous separation of static and dynamic content serving between two different webservers: one to serve regular dynamic content (like php, python, etc.) and another one to serve static files (like images, documents, media). For dynamic content we use regular apache server, but static content is served by nginx server, which is faster and shields the system from network attacks. The downside of this is that htaccess file is not respected for static content.

This new feature is implemented as a third webserver. If you make a directory called "static" inside your public_html directory, all the files stored there will be served from another domain (the link will look like this: http://1.x8.lv/username/filename , where username is your cPanel access user, and filename is the name of the file you placed in the static directory). If your page is stored on secure2 server, then the link will begin with 2.x8.lv. For example: http://1.x8.lv/serveri/lv.png points to the /home/serveri/public_html/static/lv.png file. Note that this feature works only with HTTP links - no HTTPS support is available right now (please write us an email if you require it).

Given that cookies are set for a base domain, access to resources on other domains do not require browser to send unneeded cookies, thus improving page load speed. Being just regular files on a disk, this content can be served in a fast and efficient manner. Largest web resources usually serve this type of content from a cloud (Content Delivery Network, CDN). Development in this area which is surely in Serveriem.LV future plans.


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0