[How-To] Flush DNS Cache

If you are a developer who often has to test same application deployed on different servers, the various options you have are

1.) Modify your HOSTS file to point to a new IP. You can learn more about modifying HOSTS file by reading previous posts on HOSTS file ( Microsoft Windows: More fun with the HOSTS file and Block Websites of your choice without any Software)

2.) Modify the DNS Entry of your Website. This is useful if you have testers who are not technically savvy doing the testing. In such a scenario all you need to do is modify the DNS entry and the new IP is reflected as soon as the change happens.

However, if you are having issues with the DNS IP Resolution and if even after a change on your DNS Server, the new IP is not getting reflected, its time to Flush the DNS Cache. 

DNS Resolution of My Website is Cached? How can i Clear this Cache?

Follow the Steps below

1.) In your windows machine, open the command window by going through Start –>Run and type Cmd.

Initiate the command window

Image: Initiate the command window

2.) At the Command Prompt, type ipconfig /flushdns as shown below in the figure.

Flush out DNS Cache

Image: Flush out DNS Cache

3.) Your DNS Cache is now flushed. What this means is, that your computer will now make a new request to your DNS Server for getting the IP Address. 

The above listed trick lets you flush the DNS Cache from the local resolver of your computer. However, the DNS Entry might still be cached at the DNS Server. 

How Can i Stop the Local DNS Resolver from Caching at All?

Yes. If you make frequent changes to your IP Address and would like to keep the DNS Cache Resolver away from Caching the entries, you can stop the service by typing net stop dnscache at the command prompt.

In order to start the service again, type net start dnscache.

Starting and Stopping the DNS Local Resolver Caching.

Image: Starting and Stopping the DNS Local Resolver Caching.

You can even tweak Windows Registry to modify the DNS Caching behaviour

You can modify the behavior of the Microsoft Windows DNS caching algorithm by setting two registry entries in the

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters registry key.

The MaxCacheTtl represents the maximum time that the results of a DNS lookup will be cached. The default value is 86,400 seconds. If you set this value to 1, DNS entries will only be cashed for a single second. MaxCacheTtl needs to be a new DWORD.

MaxNegativeCacheTtl represents the maximim time that the results of a failed DNS lookup will be cached. The default value is 900 seconds. If you set this value to 0, failed DNS lookups will not be cached. MaxNegativeCacheTtl needs to be a new DWORD.

How Do I Flush DNS Cache in Linux?

In Linux, DNS Cache is managed by a service called nscd. To restart the nscd daemon, use the command `/etc/init.d/nscd restart`.

 

You can follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.


Advertisements

JCrop gives you Powerful image cropping feature using JQuery

If you are someone who is looking for Image cropping functionality in your web application, try considering JCrop. Jcrop is the quick and easy way to add image cropping functionality to your web application. It combines the ease-of-use of a typical jQuery plugin with a powerful cross-platform DHTML cropping engine that is faithful to familiar desktop graphics applications. Best of all, JCrop also features clean, well-organized code that works well across most modern web browsers.

JCrop

JCrop

JCrop Feature Overview

  • Attaches unobtrusively to any image
  • Supports aspect ratio locking
  • Supports minSize/maxSize setting
  • Callbacks for selection done, or while moving
  • Keyboard support for nudging selection
  • API features to create interactivity, including animation
  • Support for CSS styling

Cross-platform Compatibility

  • Firefox 3
  • Safari 3
  • Opera 9.5
  • Google Chrome 0.2.x
  • Internet Explorer 6+

Download JCrop from here.

How Do I Get Started with JQuery?

Its simple. All you need to do is download JQuery from here. Place the relevant libraries on your webserver so that you can request them from your application. Also, importantly, ensure that you have  jQuery installed and included.

In the page <head> you’ll need to load the requisite files. That includes:

  • jQuery library
  • Jcrop Javascript
  • Jcrop CSS stylesheet

It should look something like this:

<script src="js/jquery.pack.js"></script>
<script src="js/jquery.Jcrop.pack.js"></script>
<link rel="stylesheet" href="css/jquery.Jcrop.css" type="text/css" />

Please note: These are only example paths, you probably will need to adjust them when you actually use them, to match the location of the files on your server. Jcrop will not function properly if you don’t.

Invocation

Let’s suppose we have this image our markup:

<img src="flowers.jpg" id="cropbox" />

To convert this into a Jcrop widget, insert the following script:

<script language="Javascript">
    jQuery(function() {
        jQuery('#cropbox').Jcrop();
    });
</script>

Jcrop’s default behavior is activated. Since there are no event handlers attached, it won’t do anything cool, but you can see how easy it is to implement Jcrop into your page.

You can follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

[How-To] Schedule Email Delivery of your Google Analytics Traffic Report

Google Analytics is a very powerful analytics tool for analyzing various traffic related information for your website.

Google Analytics also provides Email delivery of your traffic report. In order to setup an email delivery of your traffic report, follow the steps mentioned below.

1.) Login to your Google Analytics account.

2.) Once logged in, go to the dashboard for your particular website. 

Configuring Google Analytics Email delivery of reports.

Configuring Google Analytics Email delivery of reports.

3.) Click on the link which says “Dashboard”. Refer to the image above.

4.) You now have two options, either to send the report now itself, or to Schedule it for future deliveries.

5.) In this post we will concentrate on Scheduling Email delivery. For this, click on the tab “Schedule”.

6.) Enter key information like mail id’s to which you wish to send this report, Subject, Small description, Format ( choose pdf, preferrably) and time interval. I have the interval set to Weekly. 

 

Enter all the relevant information for scheduling Email delivery.

Enter all the relevant information for scheduling Email delivery.

7.) Click on Schedule once you are done with filling all the necessary information.

Now your Email Schedule is created. Based on the chosen time interval for delivery you will be receive Email delivery of the reports.

You can also follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

Cheers

Vaibhav

[How-To] Add Flickr Photos to your Word Documents with Ease

What do you do when you have to embed an image from Flickr into your Word Documents? Download the image from Flickr onto your own computer and embed it using Insert Image feature of Word. If you are also the one who does the same thing and wastes a lot of time and bandwidth doing all this download and insert, their is good news for you.

 

Flickr4Word is a Plugin for Microsoft Word 2007 software that allows you to insert Flickr photos into your posts. All you need to do is install this software and get started.

 

Flickr4Word lets you embed Flickr Images into Word with Ease.

Flickr4Word lets you embed Flickr Images into Word with Ease.

The plug-in enables you to search all your content, photosets, or search by tags.  It is available for free and can be downloaded from Codeplex.  For developers, the code is also made available if you want to contribute fixes and features (that comply with Flickr API terms of use).

Also Read[How To] Convert PDF to Word files for free

Kingsoft Office 2007: Microsoft Office comes free

How-To: Copy Excel cells into a Word document

 

You can follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

Cheers

Vaibhav Pandey