Category Archives: Search Media Optimization

CDN: Content Delivery Network Overview

cdn-content-delivery-network-overview

Content Delivery Networks (CDN)

 

Hi Everybody, I think you all aware about the CDN (Content Delivery Networks).

 

If not, don’t worry I am going to explain you what is CDN and how it works and how to know whether you site need CDN or not.

 

In Short: A content delivery network (CDN) places files in different locations so that the person using your webpage can receive the nearest copy.

 

Let’s discuss more about CDN?
A CDN (content delivery network) is a system of distributed servers (network) located in different parts of the globe that stores files to be used by your website visitors, It deliver web pages and other Web content to a user based on the geographic locations of the user, the origin of the webpage and a content delivery server may differ.

 

The reason why it used is, there is a measurable amount of waiting time (webpage load) for a website user who is visiting a page that may be hosted thousands of miles away. There are also routing issues that can occur when a user is visiting such a webpage. If someone in Jaipur is using a webpage that is hosted in London they are seeing a slower version of that webpage because of the above mentioned routing issues and sheer distance the files have to travel.

 

By having your files on several servers across a geographical area you can make sure the user is loading files that are near them, not all the way across the country or ocean.

This service is effective in speeding the delivery of content of websites with high traffic and websites that have global reach. The closer the CDN server is to the user geographically, the faster the content will be delivered to the user. CDNs also provide protection from large surges in traffic.

 

How it works?
In a CDN, content exists as multiple copies on strategically dispersed servers. A large CDN can have thousands of servers around the globe, making it possible for the provider to send the same content to many requesting client computing devices efficiently and reliably even when bandwidth is limited or there are sudden spikes in demand.

 

Whenever a visitor request a webpage to open, the CDN will redirect the request from the originating site’s server to a server in the CDN that is closest to the user and deliver the cached content. The CDN will also communicate with the originating server to deliver any content that has not been previously cached.

 

CDN management software dynamically calculates which server is located nearest to the requesting visiter and delivers content based on those calculations. This not only eliminates the distance that content travels, but also reduces the number of hops a data packet must make. The result is less packet loss, optimized bandwidth and faster performance which minimizes time-outs, while improving overall user experience (UX) and site health. In the event of an Internet attack or malfunction at a junction of the Internet, content that’s hosted on a CDN server will remain available to at least some users.

 

The process of bouncing through a CDN is nearly transparent to the user. The only way a user would know if a CDN has been accessed is if the delivered URL is different than the URL that has been requested.

 

Why the CDN is so much popular now a days?
The real reason that so many businesses and webmasters are now using CDNs is because Google has started using page speed as a ranking factor. Content delivery networks however provide a faster experience for users, and that means happier users who buy more things and click more ads. An additional reason for CDN use is the explosion of tablet and mobile users who depend on speed more so than desktop users who have stable internet connections.

 

Does your site need a CDN?
Content delivery networks are used for B2B interactions and in serving content to consumers. CDN is well suited for delivering large streaming audio, video, and Internet television (IPTV) programming, although an Internet service provider (ISP) may also use one to deliver static or dynamic Web pages.

 

You can also host your site on CDN, below are some outstanding improvement if CDN used:

  1. Improvement the page speed
  2. Amazing site performance for your users
  3. Make your site mobile ready and available for some geographical user even server is going down or slow.

 

Some types of websites I not recommend for CDN:

  • Local business sites (DJ, restaurants, city hair salon, city shops etc.)
  • Websites that have their main visitors or traffic in only one geographic region.

 

How much it costs for you?
CDN is a paid service provided by many hosting providers and just like every web service offered, there are almost levels of cost for content delivery networks from free to thousands of dollars depends on the service they provides.

 

Below are the list of some CDN provided listed according to popularity (visit their website for more information, cost and configuration/setup along with customer service).

  1. Akamai
  2. Max CDN
  3. Amazon CloudFront
  4. CloudFlare CDN (this has free option as well)
  5. CDNetworks

 

How do you set a CDN up?

Whenever you buy a CDN it provide a complete guide and customer service for setting it up. However below are some steps that generally followed.

 

Sign up for a service

 

Know what files you are using :
In many cases you are using a CDN to serve things like your images, CSS, and JavaScript files. Such files cause many problems for your users visiting your website from far off places. Having these assets on servers closer to your users is the entire point of having a content delivery network. There are different offerings from different CDNS, but in most scenarios your HTML will come from your webhost and your assets will come from the CDN.

 

Getting your files to the CDN servers:
You will need to get the files you want to serve to the CDN web servers. Some places will have options to do it for you almost automatically, some won’t.

Many have automatic setups if you are using WordPress, Joomla, Drupal or other common CMSs (content management systems). The basic premise however is the same across all CDNs. You will need to have your files hosted by the network and this is usually a one step process of loading those files somewhere once and the content delivery network will then replicate those files across their network.

 

Decide on how to name your URLs (CNAME):
Once your files are on the CDN servers they will have a different URL than they once did. Let’s take an CSS fill as an example. Your old CSS file was at “examplesite.com/css/style.css”, well now that you are using a CDN your CSS file is located at a URL that may look as ugly as this “dfg23345678449dhhty74/style.css” 🙁

 

Instead that name you can choose to use a name of our own choosing (the most common being “cdn.examplesite.com”) and then use something called CNAME to make sure it looks correct and nice to our users. This is a simple step that will result in our CSS file coming from “cdn.examplesite.com/style.css”.

 

Ensuring your web pages are calling (using) the files you sent to the CDN:
You can basically just tell your CMS to swap out the files automatically using common caching systems. An example for WordPress would be to use W3 TOTAL CACHE. Any blog should be using a caching system already and if your isn’t then your blog is probably slow. Using caching properly is an important step in improving page speed and will offer massive benefits to your users.

 

Testing after setup:

Most CDNs will have a page or dashboard where you can see the usage of your files. Other ways of testing would be to use webpagetest.org.

 

Whether it affect my website SEO (Search Engine Optimization)?

Yes, in some extent as the file name changes it is going to scare you :-). However the reputable CDNs have good solutions for any common SEO problems.

 

I think above article will help you to understand the CDN and host your site on CDN and some common configuration settings.

 

Advantages: Let Google Host jQuery For Your Website

advantages-let-google-host-jquery-for-your-website

Most of us (Web Developer) use JQuery during the development, if you are not aware about the jQuery or interested in any other JavaScript Library then below is just a very quick overview about the jQuery.

 

jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.”

 

Well, how you include that in your file, generally as below.

<script type="text/javascript" src="/js/jQuery.1.8.x.min.js"></script>

 

We all know that the load of JavaScript directly affect the site page load time and Obviously on SEO. Then how to get rid by jQuery?
No worries, you know as usual Google always help us so let Google host jQuery for your website.

 

You can let Google AJAX Libraries CDN (content delivery network) serve jQuery directly from Google’s network as below.
There are three main benefits of doing this is Decreased latency, Increased parallelism and Better caching that directory affect you site page load.

 

You should use/include JQuery as below

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>

 

Benefits of Google CDN Networks(Google hosted JavaScript Libraries)

 

Decreased Latency
A Content Delivery Network (CDN) distributes static content across various servers, diverse physical locations worldwide. When a user visits a page serving files from a CDN, their download will automatically target the closest available server in the network which can reduce download times.

 

Increased Parallelism
All browsers limit the number of connections that can be made simultaneously. Depending on which browser, this limit may be as low as two connections per hostname.
Using the Google AJAX Libraries CDN eliminates one request to your site, allowing more of your local content to be downloaded in parallel.

 

Better Caching
When a user visits a site, their browser will download static files so that when the user visits that page the files will not have to be downloaded again, saving bandwidth usage, server load.
Google AJAX Libraries CDN is that your users may not need to download jQuery at all.

 

If you’re curious why the <script> reference is missing the leading http:, It’s a trick which allows you to use a single reference that works on both HTTP and HTTPS pages.

 

“Protocol-less” URL is the best way to reference third party content that’s available via both HTTP and HTTPS.

 

Share your WordPress page URL on social networking website by using a simple function

share-your-wordpress-page-url-on-social-networking-website

Share your WordPress post on facebook & other social networking website.

 

If you want to share your WordPress page URL on social networking website, it’s very simple to do.

Just place this function in your functions.php file, and call the function where do you want it to show.

 

<?php

function GetShareLinks() {
 
/* Your current page URL */
 $URI = get_permalink();
 
/* The js script used for goolge plus share button */
 $sharestring ='<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>';
 
$sharestring .='<a href="https://pinterest.com/scriptarticle/" target="_blank"><img width="16" height="16" alt="Follow Me on Pinterest" src="http://passets-lt.pinterest.com/images/about/buttons/small-p-button.png"></a>
 <a href="http://www.facebook.com/sharer.php?u='.$URI.'"><img src="'.get_bloginfo('template_url').'/images/facebook.jpg" alt="" /></a>
 <a href="http://twitter.com/intent/tweet?text='.$URI.'"><img src="'.get_bloginfo('template_url').'/images/twitter.jpg" alt="" /></a>
 <a href="http://www.linkedin.com/shareArticle?mini=true&url='.$URI.'"><img src="'.get_bloginfo('template_url').'/images/in.jpg" alt="" /></a>
 <g:plusone count="false" size="small"></g:plusone>';
 
return $sharestring;
 
}

?>

 

You can also use this function in other website (non WordPress) site, you have to just replace the get_permalink() function by current page URL and update the social icons images path.

 

If you face any issue to use this, put your comment, I’ll help you 🙂

 

Search Engine Optimization & SEO rich Web Content Development

Search Engine Optimization (SEO) is the process of improving the ranking in the search engine it involves editing its content, HTML, Images.

Content is always king and it should be very relative to its specific keywords. Content portion itself of the web development process is vital to the overall success of the website and Google raking and PR.

 

Web Content is the main reason that people come to your Web pages but if your designs, architectures, and interactivity don’t provide that content they will leave.

 

Keep in mind that content is still king.

Basically, there are two types of Web Content:

=>Text
=>Multimedia

 

Text Web Content
It’s the written content that’s on the page, both inside images and in text blocks. The best textual Web Content is that text that has been written for the Web, rather than simply copy-and-pasted from a print source. Textual Web Content will also have good internal links to help readers get more information and aid in scanning the text. Finally, Web text will be written for a global audience as even local pages can be read by anyone around the world.

 

Multimedia Web Content
The other type of Web Content is multimedia. To put it simply, multimedia is any content that isn’t text, but it includes the following.

 

Images

 

Animation/Flash

 

Sound

 

Video

 

Images are the most common way to add multimedia to websites. Images on Web pages should be optimized, so that they download fast as it affect the site load speed.

 

Animation can be created using GIF images or using Flash, JavaScript, Ajax or other animation tools.

 

Sound is embedded in a Web page so that readers hear it when they enter the site or when they click a link to turn it on. Always keep in mind that sounds on Web pages can create frustration, especially if you turn it on automatically and don’t provide any way to turn it off easily.

 

Video is getting more and more popular on Web pages. But it can be challenging to add a video so that it works reliably and well across different browsers.

 

What should be there in your Web Content?

 

1)  It should be very simple, lucid and easy to read and understand.

 

2)  It should be original content (no copy-paste).

 

3)  Search Engine prefers the grammatically correct content first.

 

4)  Use optimum keywords and LSI (Latent Semantic Indexing) keywords after proper keyword analysis.

 

5)  Web Content should be written after proper SEO analysis.

 

Hope the above article will help you to write the content more SEO friendly & rich.

 

SEO Tips to Improve Your Website’s Google Ranking & Website Traffic

Boost your website in major search engines by following some SEO tips as below:

 

1) Website content is the most important for SEO.Good, well-written (spelling and grammatically) and unique with quality content that contain your primary keyword and phrases always hike your site ranking.But Search engine prefer natural language content 🙂 Don’t try to mix so much your text with keywords.

 

2) Create a network of quality back-links using your keyword phrase as the link i.e. if your target is ‘Scriptarticle’ then link to’scriptarticle’ instead of ‘Click here’ link.Not only should your links use keyword anchor text, but the text (description text) around the links should also be related to your keywords.

 

3) You must have a unique, keyword focused Title tag (h1) on every page of your site.If optimizing blog posts; optimize your post title independently from your blog title.Focus on search phrases, not single keywords, and put your location in your text (‘Our Jaipur Centre’ not only ‘Our Centre’) to help you get found in local search.

 

4) When link building, think quality, not quantity. One single, good and authoritative link can do a lot more for your site than a dozen poor quality links.Links from a high Page Rank site are good as high PR indicates high trust, so the back links will carry more weight age.

 

5) Give each page a focus on a single keyword phrase. Don’t try to optimize the page for several keywords at once.

 

6) Check for canonical issue i.e. and non-www domains. Decide which you want to use and 301 redirect the other to it. In other words, if http://www.yourdomain.com you prefer, then http://yourdomain.com should redirect to it.

 

7) Frames, Flash and AJAX all share a common problem – you can’t link to a single page. Spiders or Crawlers can crawl text, not Flash and images. Don’t use Frames at all and use Flash and AJAX as less as you can for best SEO results.

 

8) If you want a new website to be spidered, submitting through Google’s regular submission can take many days. The quickest and easiest way to get your site crawled is by getting a link to it through another quality site.

 

9) SEO doesn’t matter if you have a weak or non-existent/dead call (href) to action. Be sure your call (href) to action is clear and present.

 

10) Optimize the text in your RSS feeds just like you should with your posts and web pages. Use descriptive, keyword rich text in your title and description.

 

11) Use captions and alt tag with your images. As with newspaper photos, place keyword rich captions with your images. A lot of searches is for a keyword plus one of those words.

 

12) Good global navigation and linking and paging will serve you much better than relying only on an XML Sitemap.

 

13) During link purchase or exchange, check the cache date of the page where your link will be located in Google.Search for ‘cache:URL’ where you substitute ‘URL’ for the actual page. If the page isn’t there or the cache date is more than an month old, the page isn’t worth much.

 

14) You must be sure that your URLs reports of server headers have ‘200 OK’ status or ‘301 Moved permanently’. If the status shows anything else, check to be sure your URLs are set up properly. You can find online tool for checking server header.

 

15) Social marketing is a part of SEO.As more you understand about sites like Twitter, Facebook, LinkedIn, Digg, etc, the better you will be able to compete in search.

 

16) Some of your most links has not appeared in web sites at all but be those in the form of e-mail communications such as newsletters.

 

17) Add all components to your Blog website like reviews, sharing functions, ratings, images, visitor comments, photo gallery etc.

 

PHP: How to prevent image caching & prevent browser caching using HTTP headers

Prevent Image Caching & Prevent Browser Caching

 

The Browser(s) saves a copy of a file (like a logo image) and uses this cached (saved) copy on each page that needs the same, but some time you will not need of this i.e you want that every image and CSS and java script should be reloaded when page loads, for implementing this we need some sort of techniques as below.

 

Simple way to disable image caching (Prevent Images Caching in Browsers) is to append time stamp with the image name.

 

eg.


<img src='image_name.jpg?<?php echo time() ?>' />

 

By this browser understand a new image at every call, but HTML parser understand ‘image_name.jpg’.

 

Prevent Browser Caching

By meta tag


<meta content="Fri, 20 Jan 1984 01:11:11 GMT"/>
<meta http-equiv="Pragma" content="no-cache" />

 

Here Meta tag tells the browser,cached copy of the page in back date.That means browser never get the cached page.

 

In PHP you can also achieve this approach by header function.
Here is the example.


<?php
header('Expires: Fri, 20 Jan 1984 01:11:11 GMT');
header('Pragma: no-cache');
?>

 

Or by the use of below code you can go


<?php
header('Expires: Fri, 20 Jan 1984 01:11:11 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
?>

 

By making cache disable your site visitor will always see the latest contents.