Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
11 Tips to Reduce Server Load and Save Bandwidth
03-28-2019, 01:48 PM,
Post: #1
11 Tips to Reduce Server Load and Save Bandwidth
01. Use CSS Text Instead of Images
[Image: ttrslasb-01.jpg]
Images make your Web pages slower and consumes a lot of bandwidth of your server. Instead of using a background image, use the CSS code. For example if you want to use plain red background in your website then use CSS code background-color:#F00 instead of a red-bg.jpg. With CSS, you can set the background color or background image of any CSS element.
These is a nice tutorial on CSS-Tricks.com about how wisely you can use your background images to reduce server load.
02. Optimizing Your Images
[Image: ttrslasb-02.jpg]
More than half of the bandwidth on most websites is used by images and optimizing images is the best way to improve the bandwidth used on your web server. Optimize your images for the internet and shrink their sizes as well, never use bitmap files (.bmp) as they are HUGE (mostly in MBs). You should use jpeg (.jpg) or gif (.gif) files for images as these are optimized for the internet. A good rule of thumb is to strive for no one image being larger than 10 Kb. This is especially hard with animations, but if you can do it, you’ll notice remarkable difference in bandwidth used of your server. There are various image conversion programs/softwares available all over the internet and there are various optimization programs too, be sure to get an optimization program that will be able to retain the images quality while drastically reducing its size.
If you’re using Photoshop, use can compress your images by ‘Save for Web & Devices’ (Alt+Shift+Ctrl+S) option to optimize it for minimum bandwidth. When you have an image with lots of colours, you should go for JPEG or PNG. Play around with the quality to change the file size.
Check out the Seventh Georgia Tech GVU WWW survey as quoted in “How Much is Too Much”.
03. Compress your CSS by shorthand CSS properties
[Image: ttrslasb-03.jpg]
CSS files can be pretty big, with lots of useless breaks and spaces. CSS shorthand properties are great! They’re a great way to reduce the amount of code contained in a CSS document, allowing for faster download times and easier editing. For example you can use
Code:
1

Code:
margin

Code:

Code:
2px

 

Code:
1px
[size=undefined]
 
[/size]

Code:
3px
[size=undefined]
 
[/size]

Code:
4px
[size=undefined]
 
[/size]

Code:
(

Code:
top

Code:

Code:
right

Code:

Code:
bottom

Code:

Code:
left

Code:
)

…instead of
Code:
1

Code:
margin-top

Code:

Code:
2px

Code:
;

Code:
2

Code:
margin-right

Code:

Code:
1px

Code:
;

Code:
3

Code:
margin-bottom

Code:

Code:
3px

Code:
;

Code:
4

Code:
margin-left

Code:

Code:
4px

There is a cool article written by webcredible.co.uk about CSS shorthand properties.
You can also use the CSS Compressor from arantius.com to reduce the size of CSS file and unnecessary breaks and spaces.
04. Remove Unnecessary HTML Code, Tags and White Spaces
[Image: ttrslasb-04.jpg]
You can compresses your page size by removing unnecessary white space in your HTML files even remove comments (if not absolutely necessary) because every extra charecter means extra page size. Whether you use visual HTML editors or notepad, your HTML code contains unnecessary stuff: unneeded spaces, returns, meta tags, default values in HTML elements, etc. They will make your web pages bigger, without serving any real purpose. Bigger web pages takes longer to load, increases data traffic of your web server, and waste precious bandwidth.
Wordoff is simple and useful web tool that lets you remove unnecessary tags and styles from HTML code. Most of us have to clean up the HTML code manually in our working life. This web tool definitely help all of us in that situation and you also find this worth bookmarking.
05. Use AJAX and JavaScript Libraries
[Image: ttrslasb-05.jpg]
AJAX is a technology for a web page to communicate with a server using JavaScript without reloading the page. In general, related pages on a website consist of much content that is common between them. Using traditional methods, that content would have to be reloaded on every request. However, using Ajax, a web application can request only the content that needs to be updated, thus drastically reducing bandwidth usage and load time.
If you want to read further about techniques that you can use to save your bandwidth by take advantage of Google’s AJAX Libraries API, perishablepress.com published a article on this topic.
06. Disable File Hotlinks

Hot Linking term is linking images or downloads from your website to other website(s). Basically the images are on your website and other websites just links image tags to your website, hence stealing your bandwidth. If people are ‘hotlinking’ to your image files, they are using your bandwidth which you will ultimately pay for.
You can stop this from happening by placing a ‘.htaccess’ file in the folder where your images are stored. This will only allow requests from your own pages to display the images – anyone linking to them from outside of your website, or any website you choose, will have the ‘red x’ instead of the image.
Code:
1

Code:
RewriteEngine On

Code:
2

Code:
RewriteCond %{HTTP_REFERER} !^$

Code:
3

Code:
RewriteCond %{HTTP_REFERER} !^http(s)?:

Code:
//(.*\.)?yourserver.com [NC]

Code:
4

Code:
RewriteRule \.(jpeg|jpg|gif|png)$ - [F]

altlab.com wrote a nice tutorial to prevent hotlinking using the .htaccess file.
You can also use .htaccess generator to disable hotlinking provided by HTMLBasix.
07. Compress your HTML and PHP with GZip
[Image: ttrslasb-07.jpg]
Just like the CSS, your HTML can contain a lot of whitespaces and useless breaks. If you are using PHP then you can use mod_gzip for Apache to compress your content. Mod_gzip is a module for apache (existing on both windows and Unix/Linux versions of apache) that can significantly lower the size of a webpage on the fly, when it is requested by a browser that can understand compressed content (almost all modern browsers do support compression). Remember, the great thing is that the compression on the server is activated only if the browsers requests compressed content, in case the browser does not understand compressed content or does not request for it, the server simply servers plain, uncompressed content!
The easiest is way is by using a .htaccess file. I would recommend using .htaccess method because it’s very simple to implement and by .htaccess file you can further configure server configurations. Now to enable gzip compression add the following line to your .htaccess file.
Code:
1

Code:
php_value output_handler ob_gzhandler

Or in you can insert order for the PHP compression to work, you should insert the following line on the header of your webpages, on the top that is of your page:
Code:
1

Code:
< ? ob_start(

Code:
"ob_gzhandler"

Code:
);?>

webcodingtech.com wrote a tutorial about how to enable gzip compression.
08. Use free images/file webhosting website to host your files
[Image: ttrslasb-08.jpg]
If you want to share (big) files and not let your bandwidth effect by it, host the file on free or paid image/file hosting websites such as Flickr, Pikasa, PhotoBucket, ImageShack, rapidshare.com and megaupload.com. Host the file and place the download link on your own blog or website. This will save a tremendous amount of bandwidth on your server. Before doing this, however, make sure you are permitted by your service provider to do that.
09. Avoiding Attachments Whenever Possible
[Image: ttrslasb-09.jpg]
If the file you’re about to host on your server can be found elsewhere on the net, it maybe better to use the link of that location rather than hosting a copy of the file itself on your server. It will without any doubt cost you extra bandwidth but also increate server load. If nothing else, this will save you some time because you don’t need to upload file on your system.
10. Website Caching
[Image: ttrslasb-10.jpg]
Caching is a method of retrieving data from a ready storage (cache) instead of using resources to generate it every time the same information is needed. Enable caching on your website if it’s not dynamic, will allow the end users computer to read from your server once in a while, the rest of the times it will read from its own backup copies until they expire. Another good idea is to cache your website but you might want to set an expiry date in the HTTP headers so expire headers tell the browser how long it should keep the content in cache. Most of the images on your site never change and it is good idea to keep them cached locally.
Caching with mod_headers
Code:
1

Code:

Code:
1

 

Code:
YEAR

Code:
2

Code:
<filesmatch 

Code:
"\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"

Code:
=

Code:
""

Code:
>

Code:
3

Code:
Header set Cache-Control 

Code:
"max-age=29030400, public"

Code:
4

Code:
</filesmatch>

Code:
5
[size=undefined]
 
[/size]

Code:
6

Code:

Code:
1
[size=undefined]
 
[/size]

Code:
WEEK

Code:
7

Code:
<filesmatch 

Code:
"\.(jpg|jpeg|png|gif|swf)$"

Code:
=

Code:
""

Code:
>

Code:
8

Code:
Header set Cache-Control 

Code:
"max-age=604800, public"

Code:
9

Code:
</filesmatch>

Code:
10
[size=undefined]
 
[/size]

Code:
11

Code:

Code:
3
[size=undefined]
 
[/size]

Code:
HOUR

Code:
12

Code:
<filesmatch 

Code:
"\.(txt|xml|js|css)$"

Code:
=

Code:
""

Code:
>

Code:
13

Code:
Header set Cache-Control 

Code:
"max-age=10800"

Code:
14

Code:
</filesmatch>

Code:
15
[size=undefined]
 
[/size]

Code:
16

Code:
# NEVER CACHE

Code:
17

Code:
<filesmatch 

Code:
"\.(html|htm|php|cgi|pl)$"

Code:
=

Code:
""

Code:
>

Code:
18

Code:
Header set Cache-Control 

Code:
"max-age=0, private, no-store, no-cache, must-revalidate"

Code:
19

Code:
</filesmatch>

Caching with mod_expires
Code:
1

Code:
ExpiresActive On

Code:
2

Code:
ExpiresDefault A


Code:
3

 

Code:
4

Code:

Code:
1
[size=undefined]
 
[/size]

Code:
YEAR

Code:
5

Code:
<filesmatch 

Code:
"\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"

Code:
=

Code:
""

Code:
>

Code:
6

Code:
ExpiresDefault A

Code:
9030400

Code:
7

Code:
</filesmatch>

Code:
8
[size=undefined]
 
[/size]

Code:
9

Code:

Code:
1
[size=undefined]
 
[/size]

Code:
WEEK

Code:
10

Code:
<filesmatch 

Code:
"\.(jpg|jpeg|png|gif|swf)$"

Code:
=

Code:
""

Code:
>

Code:
11

Code:
ExpiresDefault A

Code:
604800

Code:
12

Code:
</filesmatch>

Code:
13
[size=undefined]
 
[/size]

Code:
14

Code:

Code:
3
[size=undefined]
 
[/size]

Code:
HOUR

Code:
15

Code:
<filesmatch 

Code:
"\.(txt|xml|js|css)$"

Code:
=

Code:
""

Code:
>

Code:
16

Code:
ExpiresDefault A

Code:
10800

Code:
"

Code:
17

Code:
</filesmatch>

11. Cache RSS Feeds
[Image: ttrslasb-11.jpg]
RSS or Really Simple Syndication, as it is commonly known, is a technology that gives webmasters the ability to easily distribute and publish syndicated content on the Internet. Once the feed is cached it will be read from the local hard drive for a specified amount of time. After the specified time has lapsed, the RSS feed will be fetched again. This allows the contents of the RSS feed being displayed to remain current, while expediting the whole process. Cache RSS feeds reduce bandwidth usage. The bandwidth is reduced because the web server does not have to repeatedly fetch the same RSS feed from your server.
Conclusion
If you really want to make your server load fast and control huge number traffic you should consider Litespeed webserver as alternative of apache.It will make your site 10 times more faster.
Reply
05-23-2019, 09:37 PM,
Post: #2
RE: 11 Tips to Reduce Server Load and Save Bandwidth
Shoe Net, March 14, remember the bow on the chest of primary school uniform? This classic fashion element blowout christian louboutin shoes in 2016. Just past New jordan 11 York red bottom shoes Autumn and nike factory outlet Winter nike factory store Fashion Week is no exception, from Tommy Hilfiger nike outlet store to Marc Jacobs can see its frequent occurrence, nike factory outlet believe that your latent girl's heart and jordans for sale christian louboutin foolish. nike outlet online First recommend some classic and cheap christian louboutin fashionable nike outlet bows: 1. Black Ribbon Bow Black Ribbon long ribbon always reminds people of nike store the elegant dress worn by jordans on sale European noble ladies to the dance, tied around the nike air max neck, tied in the front or nike factory store tied around the nike outlet waist, embellishing red bottom heels the christian louboutin sale elegant nike outlet store and beautiful feelings. Proenza Schouler Spring and Summer 2016 / Chanel Spring and Summer 2016 / Oscar de la Renta Spring and Summer 2016 Series 2. Exaggerated retro bows are nike outlet often seen in high-priced dresses, and garment design in 2016 nike outlet online has christian louboutin outlet become popular. So eye-catching, nike air max as if the capitalized "naive" as nike roshe run a label on the body, let a girl can not help but move foolishly!Marc Jacobs fall and winter cheap jordan shoes 2016 / Gucci spring and summer 2016 / Rochas spring and summer series 3. Lightweight perspective bow "eye-catching color nike factory store + texture lingering", reminiscent of childhood sugar paper, instant shape will bring rich levels!Gucci spring and summer 2016 / Gucci nike store I 2016 jordan 5 christian louboutin sale Spring and Summer / Lanvin 2016 Spring and Summer Series Next, I recommend some nike shoes classic, versatile and fashionable bowknot items, each of which is a necessary part of the wardrobe. First, christian louboutin shoes the most classic black ribbon bow red bottom shoes shirt nike outlet store with the 1970s breeze legs pants, or put on a cloak, the red bottom heels French girl's fresh and sweet deduction to the extreme. & Nbsp; 2. It's better to wear a solid bow shirt, pencil skirt, A-shaped skirt, jeans, broad-legged pants, which can accommodate Hold, especially silk shirts with fine touch and good quality, nike store which louboutin shoes are necessary air max for wardrobes. 3. The most nike roshe run refreshing bow-tie dress nike factory outlet is light, elegant, sweet and agile. The interpretation of "Sailor Sweets" on Tommy Hilfiger's fall and winter show in 2016 is quite peaceful! Even nike outlet online Julian Moore can't resist its attraction. It seems that a pure bow-tie silk skirt or shirt skirt is a must-have style for this spring. & Nbsp; Fourth, the most beautiful nike factory outlet scenery behind the heart of the bow to stay behind air max is a cheap christian louboutin shoes convergent but mental choice, want light sex or refreshing feeling? No nike air max problem! nike factory outlet want to have a try? christian louboutin outlet Quickly turn out the wardrobe of the bowknot items! This spring and summer cheap jordans depends on it to catch the eye. more wonderful content, welcome nike shoes to air max scan the two-dimensional code below nike shoes nike roshe run and pay attention to the official tweets of shoe webs!
Reply
06-05-2019, 02:51 PM,
Post: #3
RE: 11 Tips to Reduce Server Load and Save Bandwidth
Shoe Net, June 9, the summer nike shoes again nike outlet store set nike factory outlet off jordans on sale a pattern boom, cheap jordan shoes from nike air max jackets to jackets, nike outlet store dresses, jewelry, etc., jordans for sale each item red bottom heels has added nike factory store eye-catching nike store with gorgeous patterns, nike factory outlet especially decorative nike store air max dresses, air max even cheap jordans if there is nike factory store no special design, but nike outlet also with a unique nike shoes temperament christian louboutin sale to deduce nike roshe run the charm nike shoes of competent and eye-catching, show the nike outlet store nike outlet online style of louboutin shoes fashion. This season, let's enjoy the nike outlet store charm of floral jordan 11 nike factory store dresses. jordan 5 christian louboutin sale cheap christian louboutin shoes Flower-dyed dresses, nike outlet online A-lines, MINI's nike air max nike air max length, especially legs, nike factory store elegant style, under armour boots dating red bottom shoes nike store or attending christian louboutin shoes a friend's christian louboutin wedding, nike store or air max other important occasions are OK. Ethnic style printing and dyeing dress, loose version, chiffon under armour shoes fabric is nike shoes also quite nike roshe run cool and nike outlet online comfortable, chest nike outlet store lace configuration, foil a girl's breath. The multi-colored printing red bottom heels and dyeing dress with rich air max and nike shoes full matching color sets under armour stephen curry off the tone of the dress. It has enough skill under armour to deduce the pure charm and show the nike roshe run beauty nike air max of nike outlet air max women.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)