Showing posts with label Accelerate Blog Speed. Show all posts
Showing posts with label Accelerate Blog Speed. Show all posts

Tuesday, 6 November 2012

How To Combine Images Into CSS Sprites To Increase Blog Speed

Do you know what does the CSS Sprites mean? Do you understand them? The name might prove out to be a little bit misleading because sprites are not small size pictures as you might be thinking. A sprite is a real large image that has different types of pictures in one image file. Still confused? Have you ever noticed an image which changes its color whenever someone hovers over it? We call that functionality CSS Sprites. Adding numberless pictures into a single image file and then combining it into CSS Sprites could surely boost the speed of a website. Now a person might be thinking that Combining Images into Sprites would be extremely complicated. However, it’s not that much difficult. Today we will discuss How to Combine Images into Sprites to reduce load time.

Tutorial #2: How To Combine Images into CSS Sprites To Reduce Load Time?
Tutorial #3: How To Compress JavaScripts To Improve Site Speed?
Tutorial #4: How To Avoid Useless Widgets That Increases Blog Load Time?

What are CSS Sprites and How it Works:

Before, we get towards our tutorial its essential to understand how the CSS Sprites works. Fundamentally we add two pictures perpendicular to each other having different colors. Now with the help of CSS Sprites, we allocate the images to their desire positions. It’s not combination of 3 or 2 images into 1 because a developer can even combine unlimited images into one.  The word “sprites” is an ancient word which comes from a computer graphic industry. The idea was to fetch all the graphical data into memory and later on display it in the form of images. It was a perfect invention because it was extremely straightforward to fetch images once rather than fetching again and again. Following screenshot would surely clear your misconceptions. 

How To Combine Images Into CSS Sprites:

Well, the process is not complicated at all. However, it’s essential that a person should combines different pictures into one file with perfection. We have divided the tutorial into two portions so that we can see the improvement we get after combining images into CSS Sprites.

Before Example: Let’s start the proceeding by showing the Before EXAMPLE (Demo). Notice the following CSS coding, where ten different images are combined rather than one. Therefore, HTTP request rises, and that cause the load time of a website to increase.

<style>
#mblsprites { width: 400px; margin: 8px auto; }

#mblsprites li {
  list-style-type:none;
font-size:2em;
}

#mblsprites li a {
background-position: left center;
background-repeat: no-repeat;
padding: 0 0 0 5px;
display: block;
height: 120px;
}

#mblsprites  li a.item1 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2v92qUJms09asdVfoS_hEBOMYQYMGQtHKIBpkqIPipchrTrDZWdlc9bpAiWknh_puNgre_YObNKR6mQ415rymq6cOkg2eCoBCqEzGl56LQ9UCghyphenhyphenNkwEIYxvfnh5h4yQ0PjjJZbEG5oc/s1600/MBL.png')}
#mblsprites  li a:hover.item1 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNiA7X5K115vrGM2SQJcg9GDaF_u5HWthyphenhyphenWUNAlCBSKb_v6DGdWFH9WvYnEhVwF1yPKuT9ccfkRkxwdnLAMJHP5ugTb_QkBUj_PwaOq0SRmNDnh_YHib1P5RYXxo08m7tTuhE15ms-EPI/s1600/MBL_Color.png')}

#mblsprites  li a.item2 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0sFZt_iWcGMOAB6bUEvHlchGNJCOvHARWu9jH5cAGEmClj9aX3SN9w04gmYA-koibbigqzJPnqKbToJXAC5wQ-7V1RM7dgy4LhX3_ggMFQ32CrcYmILN7jEHo6Sjb18ZcGz_R6Qfbvl8/s1600/HTML_BLACK.png')}
#mblsprites  li a:hover.item2 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9jIl-uNyjDMOl4QIEASXFNiSrSsmQjSw5nlMKJudYaTSTOrZKBDwlFmAUL968juZvz6OhmGhzrLMeDZ0gizu9hkIeONJ5f8FejaCZiKMEADq_Kof87IMCkGQ1AHZOYsDWS_zFWPHMKxw/s1600/HTML_COLOR.png')}

#mblsprites  li a.item3 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1l-9jt0Br2IetIscIAjX9g_GVOIpWWldXTxl2YJ08hWHIch_8QwE0mTqubt2zvM_7kgtwquKzbZJ36_CGK-ktQgpEBETg9gjYo-8eNS6HvMAUUXOK5fwufxefzf9f1G6V3LRy6JPNUBA/s1600/BLOGGER_NOCOLOR.png')}
#mblsprites  li a:hover.item3 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxGAyjE9_x9z3I9kvIYFR2h8enK0wJSzm0b9vcd6G9eeJL4PcVuVZsbjLufihn52RwCuIK9li1TlqjdVET7xdIN69YdEhG3Ycp3E80P3PDF5udZCMEW-5qWYmNvWGmRXOdytY3kLVBteo/s1600/BLOGGER-COLOR.png')}

#mblsprites  li a.item4 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVszumnXbnzlUJPyz9XDx34wvWe5_tC7kgJacGnLSDKJMWQ2gIZygJIVpqqHdOVAPL-poUmOa-GDPIUJCiTyN04y2rK56VM7pWjmmJ23RczgECeLWyHpQIFIGMCm1QWnkfpdmiLlEpytM/s1600/CSS_BLACK.png')}
#mblsprites  li a:hover.item4 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKOfrsCQzxnEJQpXo5tw7KJm9AVg6HQluIWzw1rThs2_vu0YpSbcLfRX5_yM0EyMwZnSyBe93nTYo9OnZxkzPyGHLKPKzkCp8YmOfaGySlpyZSLDvofvLQwUFuaNN0adDvIKdGtqrxBhw/s1600/CSS_COLOR.png')}

#mblsprites  li a.item5 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAVYm_nx_EuKDNXzFKAc5SuMp2anj2HM4U9Yz7kTnJ2wYU7TlKGRCMONjtgmOGJ9uyh7jyxNTutE3ZAboNsPWMeKY5LnaTLYnUkzmC1pUvp76Nadiopm1rNvdHIvCOmeKr3L0g4mN3jlU/s1600/Jquery_Black.png')}
#mblsprites  li a:hover.item5 {background-image:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm0Tjo6gJLwInT-RJrmxV5cXDkKxdUzhLBjakPfTzIXsp0QtSDnqvUaegDCqvi_G8ZrLe2qx5J0HJnELfBu7IMTeyvRAqtNPph-MpYBeBvBqpVoUehtjRArjZVJteLFaCJGVbNJdwCUVs/s1600/Jquery_Color.png')}
</style>

<ul id="mblsprites">
     <li><a class="item1" href="#" title="Some Link 1"></a></li>
     <li><a class="item2" href="#" title="Some Link 2"></a></li>
     <li><a class="item3" href="#" title="Some Link 3"></a></li>
     <li><a class="item4" href="#" title="Some Link 4"></a></li>
     <li><a class="item5" href="#" title="Some Link 5"></a></li>
    </ul>
After Example: The main idea behind using a CSS sprite is to reduce the load time of a web page. Instead of having 10 different pictures, it’s essential to incorporate all pictures into one.  We can easily combine them into one long picture. Now let’s demonstrate the After EXAMPLE (Demo). Notice in the following CSS coding that there is only one Image file in which 10 different  pictures are combined and with the help of CSS Paddings plus Margins we can assign them with ease.

<style>
.mblsprites {
background-image:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigZ5-v9dbcxI4o46lanrSdW9za5X2RBvsnrGLAJDMxt7mKGVaj05SmJS_I06V5hZavIO3dAh2AO44oYCHDLqh6EQFr9e3hXNoY1bkyF2DjpRO_xUSmOV3W8bDOG8ETYNpL45LN7d3PFQI/s1600/NEW.png);
background-color: transparent;
background-repeat: no-repeat;
 }

 #MBLLOGO {
   height:104px;
   width:201px;
   margin-bottom:5px;
   background-position:-0px -104px;
 }
 #MBLLOGO:hover {
   background-position:-0px 0px;
 }

 #BLOGGERLOGO {
   height:104px;
   width:104px;
   margin-bottom:5px;
   background-position:-201px -104px;
 }
 #BLOGGERLOGO:hover {
   background-position:-201px 0px;
 }

 #HTML5LOGO {
   height:104px;
   width:104px;
   margin-bottom:5px;
   background-position:-305px -104px;
 }

 #HTML5LOGO:hover {
   background-position:-305px 0px;
 }

 #CSS3LOGO {
   height:104px;
   width:104px;
   margin-bottom:5px;
   background-position:-409px -104px;
 }

 #CSS3LOGO:hover {
   background-position:-409px 0px;
 }

 #JQUERYLOGO {
   height:104px;
   width:125px;
   margin-bottom:5px;
   background-position:-513px -104px;
 }
 #JQUERYLOGO:hover {
   background-position:-513px 0px;
 }
</style>

<div class="mblsprites" id="MBLLOGO"></div>
<div class="mblsprites" id="BLOGGERLOGO"></div>
<div class="mblsprites" id="HTML5LOGO"></div>
<div class="mblsprites" id="CSS3LOGO"></div>
<div class="mblsprites" id="JQUERYLOGO"></div>

It decreases the number of HTTP requests, so it verifies that combining images into CSS sprites is something that every single webmaster should practice in his website. It’s a delightful achievement for such a small example. Just think of it, using this technique a person could convert his website into a paradise. 

That’s Sounds Difficult? Try Some CSS Sprites Tools: 

Well, things are not hard but we made them difficult for our self. However, this technique is not that much problematic, but it is complicated for those users who have no background about CSS and HTML. Nevertheless, there are few tools that would create CSS sprites without doing any coding whatsoever. Follow the following instructions.
  • Go to www.css-sprit.es (The best tool we found so far). Once the website gets load there will be three different tabs. Just select “Standard Upload” tab but later you can experiment with its other options in depth. 
  • Input Images Files: We would recommend you to upload a picture that you want to combine into CSS.  A person can also upload multiple images and this tool will automatically combine them into one.
  • Output Options: Select the Picture extension, we would endorse PNG file because it is highly compressed. Then Select CSS from the drop down menu and proceed to the next step.
  • Hover Image Processing: Now select the effect that a person want to see on his images whenever someone will hover over it. There are numerous effects available on the Rollover Effect drop down menu that includes Sepia, Invert and more. Once everything is wrap up just press the “Create CSS Sprites” button. NOTE: If you don't want to add any hover effect then select "None" from the drop down list.
  • After pressing the “Create CSS Sprites” button, just beneath that tool you will be able to see the PREVIEW, Image Sprite, CSS Code, and HTML Coding. 
  • Just Save the Image Sprite (Left click + Save Image As) and upload it onto your web hosting.
  • Now Copy the CSS coding. If you are using Blogger platform then go to Blogger.com >> Template >> Edit HTML >> Proceed. Search for ]]></b:skin>  and above it paste the CSS coding. (Remember: From the CSS coding replace /your/image/url.png with the URL of the picture that you uploaded preciously). Finally, Save the Template.
  • Now Paste the HTML code wherever you want to display those image sprites. It could be in the header, footer and anywhere a person want them.

Some Popular Website That Uses CSS Sprites Technique: 

What do you think website giants like Yahoo, Google, Bing disregards CSS Sprites? Well, all these gigantic websites use CSS sprites technique from the time they landed on the internet. It’s quite clear that this technique play’s significant role in reducing the HTTP Request and Load time of a website. Following are the few CSS Sprite Example that we collected from high quality websites.

From The Editor's Desk:

We are also using CSS Sprites in our Footer. However, we are thinking to use this splendid technique on the other part of our blog too. We are quite sure that this technique will increase the speed of websites by a large margin because Images soaks lots of memory and takes a while to load. Combining large pictures into CSS gives boost to site speed and provides user friendly experience. As we are marching towards the end of the series, the tutorials are getting more exciting. What do you think about the CSS Sprites? Suggest any Tip that we forgotten to include. Take care of your family pals till then, Peace, Blessings and Happy Learning.

Monday, 22 October 2012

How To Analyze Your Site Speed With Online Tools?

Do you care about the load time of your website? If a certain website has low speed, then crawlers would automatically give less attention to it. Moreover, they will mark them in the list of website that takes a while to load. Therefore, the crawlers will slow down the crawling of a certain sluggish website. On the other hand, visitors do get annoyed if a webpage takes more than a few seconds to load. Visitors are hungry for content which is available on hundreds of websites so why he would sacrifice his time on a sluggish website. Webmasters think that Visitors need their help to learn, but they have no idea that without visitors how they can generate revenue. Before anyone optimize his site speed, it’s essential for every Blogger to construct a website that has a fairly better load time. Today’s article is about, how to analyze the site speed of a certain website through online tools. 

Tutorial #1: How To Analyze Your Site Speed With Online Tools?
Tutorial #3: How To Compress JavaScripts To Improve Site Speed?
Tutorial #4: How To Avoid Useless Widgets That Increases Blog Load Time?

There are bulks of online tools that give accurate information about the speed of a website. Here, we have assembled a list of few Tools that will analyze a website and would provide most appropriate results.

Comparing Your Site Speed with Others:

Comparing a website with other is always beneficial because a webmaster gets more and more curious in developing his website better than others. How about a Tool that compares the speed of two websites? On one hand, it appears fun because you can compete with your fellow bloggers that who has the most rapid speed. While on the other hand, it is extremely useful to compare load time of your site with a professional site. Just follow the following instructions to start comparing your site speed.

  • Go To http://whichloadsfaster.com.
  • Now insert Links (URLs) of two websites that you want to compare. Press the “GO” button and the system will start calculating the site speed of both websites. Once done, you will able to see which website is faster than the other. Moreover, a percentage will show you which is better. In the following screenshot, we have tested Apple.com with Adobe.com and you can see the results.

Google Site Speed Insight:

After comparing your websites with others, let’s learn how Google rates load time of a website. Google is the king of search engine, so it’s extremely vital to get a decent PageSpeed Score. By using Google Site Speed Insight tool, a webmaster can easily detect which Jquery or any other file is eating up the memory and causing to slow down the site load time. On the other hand, it provides lethal advices that how a webmaster can improve his site speed. 
  • Go to Google’s Site Insight Page.
  • Insert the website URL that you want to test.
  • Once done, you will witness a screen similar to following one.

Pingdom “Test the Load Time of a Web Page”:

This tool is extraordinary when it comes to test your site speed from different locations i.e. USA, UK and more. It provides the most detailed information about the speed of a website. Moreover, it’s free to use, so you won’t have to pay a single penny to test the load time of unlimited website. It also calculates the size of a web page, and the seconds it would take to load on a standard internet connection. If you want to get more tips about site speed then you can also try their paid services.

  • Go to Pingdom Tools Page.
  • Type the URL of a website that you wish to test.
  • Once done, you will able to see a detailed report of your website. 

These three tools would surely help a webmaster to detect whether his site is on a slower side, or its speed is normal. After testing your website in these tools remember to save a screenshot of your site speed because once this “Accelerate Blog Load Time” Series finishes we will compare the ratio of improvement in load time.

From The Editor’s Desk:

We are also using the same bunch of tools to calculate the site speed of this Blog. It would be better if you frequently check the speed of a website after doing any changes in it i.e. adding a new plugin, Widget and etc. In coming weeks, we will try our best to provide all those tips and tricks that we are applying on this blog. What are your thoughts about these Tools? Take a lot care of yourself till them Peace, blessings, and happy loading.

Sunday, 7 October 2012

How To Accelerate Blog Speed & Load Time - Series

Do you still think that quality content is the only item that makes your blog superior to others? If you are, then this might be a devastating end to your blogging career. Lots of Bloggers devote their whole life in writing quality content, but they don’t give any importance to their site speed which is extremely significant for a blog. How people will read your quality content if your site keeps on loading again, and again. They might abandon your site without wasting any further time. The whole world is full of blogs with similar information so people will not wait till your site loads. They will straightaway jump to the next website that provides similar information. In this series, we will share some rare but extraordinary secretes that a web developer uses to make sure that his site takes less time. (We will share all the tips and techniques that we have applied on this MBL Blog).
An ideal site load time is maximum 2 to 5 seconds anything more than that is not acceptable. On the other hand, we cannot sacrifice our blog design for the sake of increasing our site speed. Therefore, we will only utilize those keen methods to reduce page load time without hurting our blog design. Big Images, JavaScript, Third-party Scripts, Plugins and widgets are responsible for reducing the load time for both Blogger and WordPress blogs.
Introduction: How To Accelerate Blog Speed & Load Time? - Series
Tutorial #3: How To Compress JavaScripts To Improve Site Speed?
Tutorial #4: How To Avoid Useless Widgets That Increases Blog Load Time?
Many new bloggers fail to realize that how crucial site speed is for a blog. The biggest reason behind their careless behavior is the lack of knowledge or proper guidance. Page speed means a specific time taken by a web browser, to load a complete webpage without any interruption. A web page that takes less than 5 seconds to load is considered as the perfect site speed.

Advantages of Having a Quick Loading Blog:

Before, we start to optimize our Blog speed its essential that we understand its advantages. Following are the key points that will clear our concept that why it’s significant to have a blog that loads less than 5 seconds.
  • Reduces Bounce Rate: Speedy blog permit users to navigate through different pages without any hesitation whatsoever. It not only helps in shrink the bounce rate but also helps in increasing the time spend by a use on a website...
  • Engage Users: It engages users by converting your new visitors into your followers. Moreover, it also increases the number of page views on your blog due to the rise in the number of visitors.
  • Increase in Sponsors: Rapid site speed would grow the interests of advertisers. The chances are extremely high that advertisers might approach you for higher rates. It will be a footstep to start earning with demand.
  • More Social Media Exposure: Users will share and bookmark your articles on social networking websites i.e. Facebook, Twitter, Google+, Pinterest and etc. This will increase impression and ranking of a website.
  • Bots Will Index New Pages Quickly: Search engine upholds those websites that gives more importance to their site speed. Hence, they index new pages rather quickly. Moreover, they even rank them well in search results.
  • Increase in Mobile Users: Having a responsive website for mobile is a need of every popular website. Now day’s people are getting mobilized, so it’s extremely significant to increase our site speed to get more and more visitors from mobiles devices.

From The Editor’s Desk:

After the recent Google Panda, this would be a perfect time to maximize site speed of our blog. It would be fascinating to deliberate the techniques and tips required to make a site swift in terms of speed. We will be sharing some surprising ways of increase site speed that we’re practicing on this MBL blog. If you have any secrete tip or technique up in your sleeves then, don’t forget to include them in your comments. Please, don’t hesitate to ask your questions regarding anything that is un-cleared till then, Peace, Blessings and Happy Page Speeding.