<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>An Exclusive Place for Developers and Designers</title>
	<atom:link href="http://www.exclusivetutorials.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.exclusivetutorials.com</link>
	<description>Web Developement Tutorials</description>
	<lastBuildDate>Wed, 16 May 2012 07:20:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>$_SESSION vs $_COOKIE</title>
		<link>http://www.exclusivetutorials.com/session-vs-cookie/</link>
		<comments>http://www.exclusivetutorials.com/session-vs-cookie/#comments</comments>
		<pubDate>Wed, 16 May 2012 06:14:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[cookies cons]]></category>
		<category><![CDATA[cookies pros]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[session cons]]></category>
		<category><![CDATA[session pros]]></category>
		<category><![CDATA[session vs cookies]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=462</guid>
		<description><![CDATA[An important feature in web programming is the ability to securely pass data from one page load to the next. It used most commonly when dealing with user logins, but also for passing error messages, shopping carts, etc.  <a href='http://www.exclusivetutorials.com/session-vs-cookie/'>Continue Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/benefits-of-output-buffering/' rel='bookmark' title='Permanent Link: Benefits of Output Buffering'>Benefits of Output Buffering</a> <small>If you are not using PHP Output Buffering, you have...</small></li><li><a href='http://www.exclusivetutorials.com/basics-of-web-frameworks/' rel='bookmark' title='Permanent Link: Basics of Web Frameworks'>Basics of Web Frameworks</a> <small>The days are gone when HTML and Java Script based...</small></li><li><a href='http://www.exclusivetutorials.com/website-security-tips/' rel='bookmark' title='Permanent Link: Important Website Security Tips'>Important Website Security Tips</a> <small>Website Security is a very important subject and always needs...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><span style="color: #333333; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; font-size: 10pt; line-height: 1.6em;">Storing data across pages using PHP is done with two variables in the global scope, called $_SESSION and $_COOKIE, and although accomplishing the same end goal, the both go about it in very different ways. The purpose of this post is to give a brief look into the differences between cookies and sessions, when it is better to use one versus the other, and the pros and cons of the both.</span></p>
<div id="_mcePaste">
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; text-align: left; margin: 0px; border: initial none initial;">The difference is in how each store data. Cookies store the data locally in the user&#8217;s browser, while sessions store data on the webserver.</p>
</div>
<div>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Session Basics</h4>
<p><span style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto;"> </span></p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; text-align: left; margin: 0px; border: initial none initial;">Sessions are simply server-side cookies each with a corresponding client side cookie that contains only a reference to its server-side counterpart. When a user visits a page, the client sends the reference code to the server, and PHP will then match that reference code to a server-side cookie and load the data in the server&#8217;s cookie into the $_SESSION superglobal.</p>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Pros</h4>
<ol style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; border-image: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; font-family: 'Times New Roman'; line-height: normal; text-align: left; font-size: medium; padding: 0px; border: initial none initial;">
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Save bandwidth by passing only a reference to the session each pageload. A client-side cookie has to pass all of its data.</li>
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Session can easily store very large amount of data without any special configuration.</li>
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">The data is stored on the web server and this property makes session more secure, because the data cannot be viewed or edited by the client.</li>
</ol>
</div>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Cons</h4>
<ol style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; border-image: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; font-family: 'Times New Roman'; line-height: normal; text-align: left; font-size: medium; padding: 0px; border: initial none initial;">
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Session ends when the browser is closed unless you&#8217;ve configured php.ini to extend sessions&#8217; cookie lifetime. Sesssion cannot last forever like cookies.</li>
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Because the session variables can be created on the fly, used whenever, and do not require the developer to dispose of them explicitly, so the overuse of Session variables can lead to very unreadable and unmaintainable code.</li>
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Session variables and cookies are synonymous. If a user has set his browser not to accept any cookies, then session variables cannot work for that particular web surfer.</li>
</ol>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Cookies Basics</h4>
<p><span style="color: #000000; font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; text-align: -webkit-auto;"> </span></p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; text-align: left; margin: 0px; border: initial none initial;">On every page load, cookie data is sent to the web server. PHP reads and stores the value into the $_COOKIE superglobal. After cookie is created, you can give it a lifespan. And it will expire after that lifespan runs out.</p>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Pros</h4>
<ol style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; border-image: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; font-family: 'Times New Roman'; line-height: normal; text-align: left; font-size: medium; padding: 0px; border: initial none initial;">
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;"> Cookies last as long as the website needs. Cookies values still exists and still be there even if the browser is closed and reopened.</li>
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Cookies are very useful for &#8220;remember me&#8221; logins option. You can find this option in the sign-in pages of yahoo, hotmail, gmail etv</li>
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Useful for storing temporary user settings. For example, if a user is browsing a paginated list of items, sorted a certain way, the sorting setting can be stored in a cookie.</li>
</ol>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Cons</h4>
<ol style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 20px; border-image: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; font-family: 'Times New Roman'; line-height: normal; text-align: left; font-size: medium; padding: 0px; border: initial none initial;">
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Stored in the users filesystem. This means that the user can tamper with it and view it.</li>
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Can only store a limited amount of data.</li>
<li style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; list-style-type: decimal; list-style-position: initial; list-style-image: initial; position: relative; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; margin: 0px; border: initial none initial;">Must pass all data to the webserver each pageload. This takes up more bandwidth.</li>
</ol>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Creating a Cookie</h4>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; text-align: left; margin: 0px; border: initial none initial;">
<p>bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, int secure]]]]])</p>
<pre class="php">
<span class="phpKeyword">
if </span><span class="phpOperator">(</span><span class="phpOperator">!</span><span class="phpFunction">isset</span><span class="phpOperator">(</span><span class="phpScriptVar">$_COOKIE</span><span class="phpOperator">[</span><span class="phpString">'Ordering'</span><span class="phpOperator">]</span><span class="phpOperator">)</span><span class="phpOperator">)</span> <span class="phpOperator">{</span>
<span class="phpFunction">setcookie</span><span class="phpOperator">(</span><span class="phpString">"Ordering"</span>, <span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'ChangeOrdering'</span><span class="phpOperator">]</span>, <span class="phpFunction">time</span><span class="phpOperator">(</span><span class="phpOperator">)</span> <span class="phpOperator">+</span> 31536000<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
</pre>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Using a Cookie</h4>
<pre class="php">
<span class="phpFunction">echo</span> <span class="phpOperator">(</span><span class="phpFunction">isset</span><span class="phpOperator">(</span><span class="phpScriptVar">$_COOKIE</span><span class="phpOperator">[</span><span class="phpString">'ordering'</span><span class="phpOperator">]</span><span class="phpOperator">)</span><span class="phpOperator">)</span> <span class="phpOperator">?</span> <span class="phpScriptVar">$_COOKIE</span><span class="phpOperator">[</span><span class="phpString">'ordering'</span><span class="phpOperator">]</span> <span class="phpOperator">:</span> <span class="phpString">'cookie not set'</span><span class="phpText">;</span>
</pre>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Deleting a Cookie</h4>
<pre class="php">
<span class="phpFunction">setcookie</span><span class="phpOperator">(</span><span class="phpString">'favorite_color'</span><span class="phpOperator">)</span><span class="phpText">;</span>
</pre>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; text-align: left; margin: 0px; border: initial none initial;">To se the cookie with no value is same as to delete it. This will not remove the file from the client computer. To delete cookie, you can set the cookie expiration date to a time in the past, and the browser will take care of it.</p>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Creating a Session</h4>
<pre class="php">
<span class="phpFunction">session_start</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
</pre>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; text-align: left; margin: 0px; border: initial none initial;">This line of code should be called at the top of the code before any output. When you call this function, PHP will check to see if the user sent a session cookie. If so, it will load the session data into $_SESSION. If not, it will create a new session file on the server and send the ID back to the client.</p>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Set Session Value</h4>
<pre class="php">
<span class="phpScriptVar">$_SESSION</span><span class="phpOperator">[</span><span class="phpString">'first_name'</span><span class="phpOperator">]</span> <span class="phpOperator">=</span> <span class="phpString">'Tom'</span><span class="phpText">;</span>
</pre>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Read Session Value</h4>
<pre class="php">
<span class="phpScriptVar">$_SESSION</span><span class="phpOperator">[</span><span class="phpString">'first_name'</span><span class="phpOperator">]</span><span class="phpText">;</span>
</pre>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">Remove Session Data</h4>
<pre class="php">
<span class="phpFunction">unset</span><span class="phpOperator">(</span><span class="phpScriptVar">$_SESSION</span><span class="phpOperator">[</span><span class="phpString">'first_name'</span><span class="phpOperator">]</span><span class="phpOperator">)</span><span class="phpText">;</span>
</pre>
<h4 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; border-image: initial; font-size: 21px; font-weight: normal; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #333333; clear: both; line-height: normal; text-align: left; padding: 0px; border: initial none initial;">End Session</h4>
<pre class="php">
<span class="phpFunction">session_destroy</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
</pre>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 10px; padding-left: 0px; border-image: initial; font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, arial, sans-serif; line-height: 1.6em; color: #333333; text-align: left; margin: 0px; border: initial none initial;">Sessions are cookies where the data is stored on the server. Cookies are stored in the users filesystem mostly in the &#8220;Temporary Internet Files&#8221; folder. Both have their advantages, but coders use sessions more as compared to cookies.</p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/benefits-of-output-buffering/' rel='bookmark' title='Permanent Link: Benefits of Output Buffering'>Benefits of Output Buffering</a> <small>If you are not using PHP Output Buffering, you have...</small></li><li><a href='http://www.exclusivetutorials.com/basics-of-web-frameworks/' rel='bookmark' title='Permanent Link: Basics of Web Frameworks'>Basics of Web Frameworks</a> <small>The days are gone when HTML and Java Script based...</small></li><li><a href='http://www.exclusivetutorials.com/website-security-tips/' rel='bookmark' title='Permanent Link: Important Website Security Tips'>Important Website Security Tips</a> <small>Website Security is a very important subject and always needs...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/session-vs-cookie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basics of Web Frameworks</title>
		<link>http://www.exclusivetutorials.com/basics-of-web-frameworks/</link>
		<comments>http://www.exclusivetutorials.com/basics-of-web-frameworks/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 06:00:36 +0000</pubDate>
		<dc:creator>Jia Muraash</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[web frameworks]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=449</guid>
		<description><![CDATA[The days are gone when HTML and Java Script based websites were attracted for the people, today the world of web is ruled by dynamic applications. Some other benefits of frameworks are: Generalizing queries, code generation, Ajax, Form Handling, MVC Architecture and Event Driven Programming. <a href='http://www.exclusivetutorials.com/basics-of-web-frameworks'>Continue Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/website-security-tips/' rel='bookmark' title='Permanent Link: Important Website Security Tips'>Important Website Security Tips</a> <small>Website Security is a very important subject and always needs...</small></li><li><a href='http://www.exclusivetutorials.com/memcached-server-installation/' rel='bookmark' title='Permanent Link: Memcached Server Installation and Access with PHP'>Memcached Server Installation and Access with PHP</a> <small>An exclusive tutorial about MEMCACHED Server, its simple installation method...</small></li><li><a href='http://www.exclusivetutorials.com/geoip-country-lookup-with-php/' rel='bookmark' title='Permanent Link: Country lookup with PHP via GeoIP'>Country lookup with PHP via GeoIP</a> <small>How to get users location i.e. country, city etc using...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>No doubt, the javascript and html are the basic principles of web development, but the current need is not just a static  website. If we discuss present scanario i.e. in near future we will find out that people visiting web just want a real life experience and that cannot be accomplished by static website, for that a website needs too be dynamic, robust and interactive.</p>
<p>Mostly dynamic websites are built on Web application frameworks. Nowadays, there are number of frameworks available today both paid and free. Let us take a over view of what is Web application frameworks.</p>
<p><strong>What is a Web Framework</strong></p>
<p>A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and they often promote code reuse.</p>
<p><strong>Functions of Framework</strong></p>
<p>Web application frame works are made to cater wide range of needs of designers and developers.</p>
<p><strong>Database:</strong> Nowadays, mostly Web development frame works are database driven because they provide support to multiple databases like My SQL, SQL ++, Oracle and others.</p>
<p><strong>Web Templates:</strong> Dynamic website is divided in two parts static i.e. HTML and Dynamic Template i.e. code generation part for HTML. In a template we can insert variables without the knowledge coding.</p>
<p><strong>User Management:</strong> One of the most important features of any framework is user management because it supports User Logins there roles and there limitations as a user.</p>
<p><strong>URL Mapping:</strong> This make it possible for a framework to interpretate URL with ease and simplification for user. URL mapping  means URL simplification.  Nowadays, mostly Web development frame works are database driven because they provide support to multiple databases like My SQL, SQL ++, Oracle and others.</p>
<p>Web Templates: – Dynamic website is divided in two parts static i.e. HTML and Dynamic Template i.e. code generation part for HTML. In a template we can insert variables without the knowledge coding.</p>
<p><strong>User Management:</strong> One of the most important features of any framework is user management because it supports User Logins there roles and there limitations as a user.</p>
<p><strong>URL Mapping:</strong> This make it possible for a framework to interpretate URL with ease and simplification for user. URL mapping  means URL simplification.</p>
<p><strong>Most Popular Frameworks</strong></p>
<p>Zend Framework<br />
Symfony<br />
Codelgniter<br />
CakePHP<br />
Kohana</p>
<p>Currently, there are numbers of Web application frameworks available but among all, three are most popular once and they are CMS (Content Management System).</p>
<p>WordPress<br />
Joomla<br />
Drupal</p>
<p>I believe this topic will help you to get the basic understanding of frameworks.</p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/website-security-tips/' rel='bookmark' title='Permanent Link: Important Website Security Tips'>Important Website Security Tips</a> <small>Website Security is a very important subject and always needs...</small></li><li><a href='http://www.exclusivetutorials.com/memcached-server-installation/' rel='bookmark' title='Permanent Link: Memcached Server Installation and Access with PHP'>Memcached Server Installation and Access with PHP</a> <small>An exclusive tutorial about MEMCACHED Server, its simple installation method...</small></li><li><a href='http://www.exclusivetutorials.com/geoip-country-lookup-with-php/' rel='bookmark' title='Permanent Link: Country lookup with PHP via GeoIP'>Country lookup with PHP via GeoIP</a> <small>How to get users location i.e. country, city etc using...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/basics-of-web-frameworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traditional VS Bracketless if-else condition</title>
		<link>http://www.exclusivetutorials.com/traditional-vs-bracketless-if-else-statement/</link>
		<comments>http://www.exclusivetutorials.com/traditional-vs-bracketless-if-else-statement/#comments</comments>
		<pubDate>Mon, 02 May 2011 10:17:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[if else]]></category>
		<category><![CDATA[if-else statement]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=436</guid>
		<description><![CDATA[There is no denying the fact that some developers are using traditional statements and some are using bracket less. But witch one is better to use? Read this article to find the answer.<br /> <a href='http://www.exclusivetutorials.com/traditional-vs-bracketless-if-else-statement/'>Contiune Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/geoip-country-lookup-with-php/' rel='bookmark' title='Permanent Link: Country lookup with PHP via GeoIP'>Country lookup with PHP via GeoIP</a> <small>How to get users location i.e. country, city etc using...</small></li><li><a href='http://www.exclusivetutorials.com/session-vs-cookie/' rel='bookmark' title='Permanent Link: $_SESSION vs $_COOKIE'>$_SESSION vs $_COOKIE</a> <small>An important feature in web programming is the ability to...</small></li><li><a href='http://www.exclusivetutorials.com/benefits-of-output-buffering/' rel='bookmark' title='Permanent Link: Benefits of Output Buffering'>Benefits of Output Buffering</a> <small>If you are not using PHP Output Buffering, you have...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>There is no denying the fact that some developers are using traditional statements and some are using bracket less. But witch one is better to use?<br />
Iam trying to prove it by doing a simple test. I created 3 files: mytest1.php, mytest2.php and mytest3.php. Inside these I’m running PHP’s <strong>for loop</strong> which is executed exactly 1 million times and I’m checking every number  if it is odd or even with if-else statements. Difference:</p>
<ul>
<li>mytest1.php: traditional: <em>if(){do_smth;}else{do_smth;}</em></li>
<li>mytest2.php: curly brackets: <em>if()do_smth;else do_smth;</em></li>
<li>mytest3.php: colon: <em>if():do_smth;else: do_smth;endif;</em></li>
</ul>
<h3>mytest1.php</h3>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">microtime</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">explode</span><span class="phpOperator">(</span><span class="phpString">" "</span>, $time<span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> $time<span class="phpOperator">[</span><span class="phpNumber">1</span><span class="phpOperator">]</span> <span class="phpOperator">+</span> $time<span class="phpOperator">[</span><span class="phpNumber">0</span><span class="phpOperator">]</span><span class="phpText">;</span>
$start <span class="phpOperator">=</span> $time<span class="phpText">;</span>
<span class="phpKeyword">
for<span class="phpOperator">(</span></span>$i <span class="phpOperator">=</span> <span class="phpNumber">1</span><span class="phpText">;</span> $i <span class="phpOperator">&lt;</span><span class="phpOperator">=</span> 1000000; $i<span class="phpOperator"><span class="phpOperator">+</span><span class="phpOperator">+</span></span><span class="phpOperator">)</span><span class="phpOperator">{</span>
<span class="phpKeyword">
if<span class="phpOperator">(</span></span>$i % <span class="phpNumber">2</span><span class="phpOperator">)</span><span class="phpOperator">{</span>
<span class="phpFunction">echo</span> $i<span class="phpOperator">.</span><span class="phpString">" is odd"</span><span class="phpText">;</span>
<span class="phpKeyword"><span class="phpOperator">}</span><span class="htmlText">else</span><span class="phpOperator">{</span></span>
<span class="phpFunction">echo</span> $i<span class="phpOperator">.</span><span class="phpString">" is even"</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="phpOperator">}</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">microtime</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">explode</span><span class="phpOperator">(</span><span class="phpString">" "</span>, $time<span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> $time<span class="phpOperator">[</span><span class="phpNumber">1</span><span class="phpOperator">]</span> <span class="phpOperator">+</span> $time<span class="phpOperator">[</span><span class="phpNumber">0</span><span class="phpOperator">]</span><span class="phpText">;</span>
$finish <span class="phpOperator">=</span> $time<span class="phpText">;</span>
$totaltime <span class="phpOperator">=</span> <span class="phpOperator">(</span>$finish - $start<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">printf</span> <span class="phpOperator">(</span><span class="phpString">"This page took %f seconds to load<span class="phpOperator">.</span>"</span>, $totaltime<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<h3>mytest2.php</h3>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">microtime</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">explode</span><span class="phpOperator">(</span><span class="phpString">" "</span>, $time<span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> $time<span class="phpOperator">[</span><span class="phpNumber">1</span><span class="phpOperator">]</span> <span class="phpOperator">+</span> $time<span class="phpOperator">[</span><span class="phpNumber">0</span><span class="phpOperator">]</span><span class="phpText">;</span>
$start <span class="phpOperator">=</span> $time<span class="phpText">;</span>
<span class="phpKeyword">
for<span class="phpOperator">(</span></span>$i <span class="phpOperator">=</span> <span class="phpNumber">1</span><span class="phpText">;</span> $i <span class="phpOperator">&lt;</span><span class="phpOperator">=</span> 1000000; $i<span class="phpOperator"><span class="phpOperator">+</span><span class="phpOperator">+</span></span><span class="phpOperator">)</span><span class="phpOperator">{</span>
<span class="phpKeyword">
if<span class="phpOperator">(</span></span>$i % <span class="phpNumber">2</span><span class="phpOperator">)</span>
<span class="phpFunction">echo</span> $i<span class="phpOperator">.</span><span class="phpString">" is odd"</span><span class="phpText">;</span>
<span class="phpKeyword">
else
</span>
<span class="phpFunction">echo</span> $i<span class="phpOperator">.</span><span class="phpString">" is even"</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">microtime</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">explode</span><span class="phpOperator">(</span><span class="phpString">" "</span>, $time<span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> $time<span class="phpOperator">[</span><span class="phpNumber">1</span><span class="phpOperator">]</span> <span class="phpOperator">+</span> $time<span class="phpOperator">[</span><span class="phpNumber">0</span><span class="phpOperator">]</span><span class="phpText">;</span>
$finish <span class="phpOperator">=</span> $time<span class="phpText">;</span>
$totaltime <span class="phpOperator">=</span> <span class="phpOperator">(</span>$finish - $start<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">printf</span> <span class="phpOperator">(</span><span class="phpString">"This page took %f seconds to load<span class="phpOperator">.</span>"</span>, $totaltime<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<h3>mytest3.php</h3>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">microtime</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">explode</span><span class="phpOperator">(</span><span class="phpString">" "</span>, $time<span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> $time<span class="phpOperator">[</span><span class="phpNumber">1</span><span class="phpOperator">]</span> <span class="phpOperator">+</span> $time<span class="phpOperator">[</span><span class="phpNumber">0</span><span class="phpOperator">]</span><span class="phpText">;</span>
$start <span class="phpOperator">=</span> $time<span class="phpText">;</span>
<span class="phpKeyword">
for<span class="phpOperator">(</span></span>$i <span class="phpOperator">=</span> <span class="phpNumber">1</span><span class="phpText">;</span> $i <span class="phpOperator">&lt;</span><span class="phpOperator">=</span> 1000000; $i<span class="phpOperator"><span class="phpOperator">+</span><span class="phpOperator">+</span></span><span class="phpOperator">)</span><span class="phpOperator">{</span>
<span class="phpKeyword">
if<span class="phpOperator">(</span></span>$i % <span class="phpNumber">2</span><span class="phpOperator">)</span><span class="phpOperator">:</span>
<span class="phpFunction">echo</span> $i<span class="phpOperator">.</span><span class="phpString">" is odd"</span><span class="phpText">;</span>
<span class="phpKeyword">
else<span class="phpOperator">:</span></span>
<span class="phpFunction">echo</span> $i<span class="phpOperator">.</span><span class="phpString">" is even"</span><span class="phpText">;</span>
<span class="phpKeyword">
endif<span class="phpText">;</span></span>
<span class="phpOperator">}</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">microtime</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> <span class="phpFunction">explode</span><span class="phpOperator">(</span><span class="phpString">" "</span>, $time<span class="phpOperator">)</span><span class="phpText">;</span>
$time <span class="phpOperator">=</span> $time<span class="phpOperator">[</span><span class="phpNumber">1</span><span class="phpOperator">]</span> <span class="phpOperator">+</span> $time<span class="phpOperator">[</span><span class="phpNumber">0</span><span class="phpOperator">]</span><span class="phpText">;</span>
$finish <span class="phpOperator">=</span> $time<span class="phpText">;</span>
$totaltime <span class="phpOperator">=</span> <span class="phpOperator">(</span>$finish - $start<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">printf</span> <span class="phpOperator">(</span><span class="phpString">"This page took %f seconds to load<span class="phpOperator">.</span>"</span>, $totaltime<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<h2>Testing</h2>
<p>Iam running each file 5 times and then I’ll count <strong>an average time</strong> for each one. We will see if there is any difference <strong>in load time</strong>.</p>
<p>I am running each file 5 times and then I’ll count <strong>an average time</strong> for each one. We will see if there is any difference <strong>in load time</strong>.</p>
<h4>mytest1.php load times:</h4>
<ul>
<li>3.062667 s</li>
<li>2.915338 s</li>
<li>3.162933 s</li>
<li>3.161454 s</li>
<li>3.521963 s</li>
</ul>
<p>Average: 3.164871 s</p>
<h4>mytest2.php load times:</h4>
<ul>
<li>2.688994 s</li>
<li>3.250662 s</li>
<li>3.346098 s</li>
<li>3.001084 s</li>
<li>2.978943 s</li>
</ul>
<p>Average:3.053156 s</p>
<h4>mytest3.php load times:</h4>
<ul>
<li>2.747105 s</li>
<li>3.222176 s</li>
<li>3.197005 s</li>
<li>3.235344 s</li>
<li>3.391850 s</li>
</ul>
<p>Average:3.158696 s</p>
<h2>Conclusion</h2>
<p>All 3 tests were close, but test #2 (curly brackets) was a bit faster  than rest 2. I must say, that this if-else statement was executed 1  million times, so <strong>there is absolutely no difference</strong> in any actual project at load speed. Another thing I haven’t mentioned above is your code’s <strong>readability</strong>.</p>
<p>With traditional brackets code is much easier to read for humans, so I  would still recommend you to stick with basic, old-fashioned  if(){}elseif(){}else{} variant. Share with opinions by giving your comments.</p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/geoip-country-lookup-with-php/' rel='bookmark' title='Permanent Link: Country lookup with PHP via GeoIP'>Country lookup with PHP via GeoIP</a> <small>How to get users location i.e. country, city etc using...</small></li><li><a href='http://www.exclusivetutorials.com/session-vs-cookie/' rel='bookmark' title='Permanent Link: $_SESSION vs $_COOKIE'>$_SESSION vs $_COOKIE</a> <small>An important feature in web programming is the ability to...</small></li><li><a href='http://www.exclusivetutorials.com/benefits-of-output-buffering/' rel='bookmark' title='Permanent Link: Benefits of Output Buffering'>Benefits of Output Buffering</a> <small>If you are not using PHP Output Buffering, you have...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/traditional-vs-bracketless-if-else-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tips to improve webpage load time</title>
		<link>http://www.exclusivetutorials.com/tips-to-improve-webpage-load-time/</link>
		<comments>http://www.exclusivetutorials.com/tips-to-improve-webpage-load-time/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 17:02:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[increase loading speed of website]]></category>
		<category><![CDATA[webpage load time]]></category>
		<category><![CDATA[webpage speed]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=421</guid>
		<description><![CDATA[Patience is a virtue, but for many, it is often a difficult concept to practice. This is really correct for web users visiting a website that takes a long time to load. Users liked websites that loads quickly, and when a site responds slowly, visitors lose their interest and  come back. <a href='http://www.exclusivetutorials.com/tips-to-improve-webpage-load-time/'>Continue Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/website-security-tips/' rel='bookmark' title='Permanent Link: Important Website Security Tips'>Important Website Security Tips</a> <small>Website Security is a very important subject and always needs...</small></li><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li><li><a href='http://www.exclusivetutorials.com/traditional-vs-bracketless-if-else-statement/' rel='bookmark' title='Permanent Link: Traditional VS Bracketless if-else condition'>Traditional VS Bracketless if-else condition</a> <small>There is no denying the fact that some developers are...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Patience is a virtue, but for many, it is often a difficult concept to practice. This is really correct for web users visiting a website that takes a long time to load. Users liked websites that loads quickly, and when a site responds slowly, visitors lose their interest and  come back.</p>
<p>Improving the speed of website is necessary not only to users, but for search engine rankings as well. Last April, Google announced that they are now including website speed in their search ranking algorithms.</p>
<p>I am sharing some tips to improve the performance of web page loading time</p>
<h3>1. Test the Speed of the Website</h3>
<p>The first thing you should do is to analyze your current page  speed. This allows to track your improvement and ensure that any  changes you make, positively improves your page load times.</p>
<p>There are various free tools out there for checking how long it takes to load your website:</p>
<ul>
<li><a href="http://tools.pingdom.com/">Pingdom</a> offers an easy-to-use site speed test that mimics that way a page is loaded in a web browser.</li>
<li><a href="http://code.google.com/speed/page-speed/">Page Speed</a> is  an open source Firefox add-on that helps you assess the performance of  your web pages. It also provides suggestions on how to fix performance  issues.</li>
<li><a href="http://www.webpagetest.org/">Web Page Test</a> is another great tool that shows you the speed and performance of your website in different browsers.</li>
</ul>
<h3>Image Optimization</h3>
<p>you should know that when to use the appropriate file format for your images.  Changing to a different file format can dramatically decrease the file  size of an image.</p>
<ul>
<li><strong>GIF</strong> is ideal for images with few colors like logos.</li>
<li><strong>JPEG</strong> is great for images with lots of colors and details like photographs.</li>
<li><strong>PNG</strong> is the choice when you need high quality transparent images.</li>
</ul>
<h3>3. Do not Scale Down the Images</h3>
<p>Avoid using a larger image than you need just because you can set the <code>width</code> and <code>height</code> attributes of <code>&lt;img&gt;</code> elements in HTML.</p>
<p>If you need a 100x100px image and you have a 700x700px image, use an image editor like Photoshop or one of these web-based image editors to resize the image to the needed dimensions. This lowers the file size  of the image, thus helping to decrease page loading times.</p>
<h3>4. Compress and Optimize Your Content</h3>
<p>Compressing your website content can have a huge impact  on reducing load times. When using HTTP compression, all of your web  page data is sent in a single smaller file instead of a request that is  full of many different files. For more information, see this Wikipedia  article on <a href="http://en.wikipedia.org/wiki/HTTP_compression">HTTP Compression</a>.</p>
<p>You can also optimize and compress your JavaScript and CSS files by combining them and minifying the source code.</p>
<h3>5. Put Stylesheet References at the Top</h3>
<p>Moving your stylesheet references to the <code>&lt;head&gt;</code> of your HTML document helps your pages feel like it is loading faster because doing so allows  your pages to render the styles progressively. In addition, it doesn’t  hurt that <a href="http://www.w3.org/TR/html4/struct/links.html#h-12.3">it’s the W3C standard</a>.</p>
<h3>6. Put Script References at the Bottom</h3>
<p>Browsers can only download two components per hostname at the same  time. If you add your scripts towards the top, it would block anything  else below it on the initial loading of the page. This makes it feel  like the page is loading slower.</p>
<p>To avoid this situation, place script references as far down the HTML document as possible, preferably right before the closing <code>&lt;body&gt;</code> tag.</p>
<h3>7. To Place CSS &amp; JavaScript in External Files</h3>
<p>If your JavaScript and CSS are directly in your HTML document, they  are downloaded every time an HTML document is requested. This, then,  doesn’t take advantage of browser caching and increases the size of the  HTML document.</p>
<p>Always place your CSS and JavaScript in external files; it’s a best practice and makes your site easier to maintain and update.</p>
<h3>8. Minimise HTTP Requests</h3>
<p>When visiting a new web page, most of the page-loading time is spent  downloading components of that page (e.g. images, stylesheets, and  scripts).</p>
<p>By minimizing the number of requests a web page needs to make, it  will load faster. To reduce HTTP requests for images, one thing you can  do is to use <a href="http://sixrevisions.com/css/css-sprites-site-speed/">CSS sprites</a> to combine multiple images.</p>
<p>If you have multiple stylesheets and JavaScript libraries, consider combining them to reduce the number of HTTP requests.</p>
<h3>9. Cache the Web Pages</h3>
<p>If you use a content management system that dynamically generates your web pages, you should statically cache  your web pages and database queries so that you can decrease the strain  on your server as well as speed up page rendering times.</p>
<p>When you cache your page, it saves a static version of it to be  presented to the user instead of recreating it every time it’s  requested.</p>
<p>For WordPress, check out <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a> and <a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache</a> (also read this <a href="http://codex.wordpress.org/WordPress_Optimization/Caching">WordPress codex entry on optimizing/caching WordPress</a>). Drupal core has native caching.</p>
<h3>10. Reduce 301 Redirects</h3>
<p>Every time a 301 redirect is used, it forces the browser to a new URL  which increases page-loading times. If possible, avoid using 301  redirects.</p>
<h3>Conclusion</h3>
<p>Web page speed should not be ignored if you are concerned about providing an optimal user experience.</p>
<p>If you want more information to improve your website’s page load times then read <a href="http://code.google.com/speed/">Google’s section on page speed</a>, which provides tools, articles, and community feedback regarding website speed. Good luck and happy optimizing!</p>
<p>Finally, share your thoughts about this articles as well.</p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/website-security-tips/' rel='bookmark' title='Permanent Link: Important Website Security Tips'>Important Website Security Tips</a> <small>Website Security is a very important subject and always needs...</small></li><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li><li><a href='http://www.exclusivetutorials.com/traditional-vs-bracketless-if-else-statement/' rel='bookmark' title='Permanent Link: Traditional VS Bracketless if-else condition'>Traditional VS Bracketless if-else condition</a> <small>There is no denying the fact that some developers are...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/tips-to-improve-webpage-load-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip to open flash file in full screen in browser</title>
		<link>http://www.exclusivetutorials.com/flash-file-in-full-screen/</link>
		<comments>http://www.exclusivetutorials.com/flash-file-in-full-screen/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 08:02:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=399</guid>
		<description><![CDATA[A quick tip for designers and developers to open a flash file in full screen in a browser. A demo is also added to display its proper working.
<br />
<a href='http://www.exclusivetutorials.com/flash-file-in-full-screen/'>Continue Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/best-ajax-file-uploaders/' rel='bookmark' title='Permanent Link: Top 5 AJAX File Uploaders'>Top 5 AJAX File Uploaders</a> <small>File Uploading is a basic part of any Blogging, CMS...</small></li><li><a href='http://www.exclusivetutorials.com/designing-a-beautiful-contact-form/' rel='bookmark' title='Permanent Link: Designing a beautiful Contact Form'>Designing a beautiful Contact Form</a> <small>I hope that this will be an interesting tutorial for...</small></li><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">For the Flash Player 9,0,28,0 update, flash applets can go to true full-screen.</p>
<p style="text-align: justify;">There are no fancy javascript hacks needed either. Every User toggles between normal size and fullscreen with a just mouse click, which can toggle Stage["displayState"] from “normal” to “fullScreen”.</p>
<p style="text-align: justify;">The parameter allow FullScreen should be set to true in the applet html, otherwise it will not work</p>
<p style="text-align: justify;">
<pre class=""html"">
&lt;param name="allowFullScreen" value="true" /&gt;
</pre>
</p>
<p>The first thing to do is create a button and add the following code  to it:</p>
<pre class=""html"">
<pre>
<ol>
<li> on(press){</li>
<li>   toggleFullScreen();</li>
<li> }</li>
<li></pre>
</li>
</ol>
<p>The code for the function toggleFullScreen and a resize listener are  placed on the main stage.</pre>
<p style="text-align: justify;">
<pre class=""html"">
<p style="text-align: justify;">01  //Don't scale the movie when the stage size changes
02 Stage.scaleMode="noScale";
03 //Align the stage to the top left
04 Stage.align = "TL";
05 //Function to toggle between fullscreen and normal size
06 //the toggle fullscreen button calls this function when pressed
07 function toggleFullScreen(){
08   //if normal size, go to fullscreen, else go to normal size
09   if(Stage["displayState"]=="normal"){
10     Stage["displayState"]="fullScreen";
11   }else{
12     Stage["displayState"]="normal";
13   }
14 }
15 //Create a listener for each time the Stage is resized
16 var resizeListener:Object = new Object();
17 //Called each time the stage is resized
18 resizeListener.onResize = function () {
19   //Move the button to the center of the screen
20   toggleFullScreenButton._x=Stage.width/2;
21   toggleFullScreenButton._y=Stage.height/2;
22 }
22 //Add the listener to Stage
23 Stage.addListener(resizeListener);</pre>
<p><strong>Example XHTML used for this applet:</strong></p>
<p><strong>
<pre class=""html""></strong>
<pre><strong>&lt;object data="http://www.exclusivetutorials.com/wp-content/uploads/2010/<a title="flash" href="http://www.exclusivetutorials.com/category/flash/">09</a>/<a title="flash" href="http://www.exclusivetutorials.com/category/flash/">flash</a>-<a title="fullscreen" href="http://www.exclusivetutorials.com/tag/fullscreen/">fullscreen</a>.swf"  type="application/x-shockwave-<a title="flash" href="http://www.exclusivetutorials.com/category/flash/">flash</a>" width="400" height="200" &gt;
  &lt;param name="movie" value="http://www.exclusivetutorials.com/wp-content/uploads/2010/09/<a title="flash" href="http://www.exclusivetutorials.com/category/flash/">flash</a>-<a title="fullscreen" href="http://www.exclusivetutorials.com/tag/fullscreen/">fullscreen</a>.swf" /&gt;
  &lt;param name="allowFullScreen" value="true" /&gt;
  &lt;/object&gt;</strong>
</pre>
</pre>
<p>The balls were added in to show that the stage extends to the borders  of the screen, even when resized.</p>
<p><a href="http://www.exclusivetutorials.com/wp-content/uploads/2010/09/flash-fullscreen.html">View Demo</a></p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/best-ajax-file-uploaders/' rel='bookmark' title='Permanent Link: Top 5 AJAX File Uploaders'>Top 5 AJAX File Uploaders</a> <small>File Uploading is a basic part of any Blogging, CMS...</small></li><li><a href='http://www.exclusivetutorials.com/designing-a-beautiful-contact-form/' rel='bookmark' title='Permanent Link: Designing a beautiful Contact Form'>Designing a beautiful Contact Form</a> <small>I hope that this will be an interesting tutorial for...</small></li><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/flash-file-in-full-screen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Top 5 AJAX File Uploaders</title>
		<link>http://www.exclusivetutorials.com/best-ajax-file-uploaders/</link>
		<comments>http://www.exclusivetutorials.com/best-ajax-file-uploaders/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 18:38:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ajax uploader]]></category>
		<category><![CDATA[best ajax uploader]]></category>
		<category><![CDATA[best file uploaders]]></category>
		<category><![CDATA[file uploader]]></category>
		<category><![CDATA[free ajax uploaders]]></category>
		<category><![CDATA[top 5 ajax uploaders]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=359</guid>
		<description><![CDATA[File Uploading is a basic part of any Blogging, CMS or social media website. Ajax upload script and plugin made it easier for the user to add the upload capability in the website. The best thing is these uploaders are free and you can even use them in your commercial applications as well.<br /><br /> <a href='http://www.exclusivetutorials.com/best-ajax-file-uploaders/'>Continue Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li><li><a href='http://www.exclusivetutorials.com/html5-tags/' rel='bookmark' title='Permanent Link: HTML5 New Tags'>HTML5 New Tags</a> <small>HTML 5 comes with variety of new tags which definitely...</small></li><li><a href='http://www.exclusivetutorials.com/typography-solutions-flir-and-sifr/' rel='bookmark' title='Permanent Link: Typography Solutions &#8211; Flir and sIFR'>Typography Solutions &#8211; Flir and sIFR</a> <small>I really not satisfied with the lack of support for...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<h3>1) <span style="color: #000000;">AJAX Upload by Andrew Valums</span></h3>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-361" title="ajax-4" src="http://www.exclusivetutorials.com/wp-content/uploads/2010/06/ajax-4.png" alt="Ajax Uploader" width="574" height="250" /></p>
<p>This <a rel="external nofollow" href="http://valums.com/ajax-upload/" target="_self">AJAX Upload</a> by Andrew Valmus allows to upload multiple files without refreshing the page and use any element to show file selection window. The best thing is that it works in all major browsers and doesn’t require any javascript library to run. AJAX Upload doesn’t pollute the global namespace, and is tested with jQuery, Prototypejs.﻿</p>
<p>The official website of this plugin is <a href="http://valums.com/ajax-upload" target="_blank">Ajax Upload by Andrew Valums</a></p>
<h3>2) Fancy Upload</h3>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-366" title="ajax-1" src="http://www.exclusivetutorials.com/wp-content/uploads/2010/06/ajax-1.png" alt="Ajax Upload" width="574" height="250" /><a rel="external nofollow" href="http://digitarald.de/project/fancyupload/3-0/showcase/photoqueue/" target="_blank"></a></p>
<p><a rel="external nofollow" href="http://digitarald.de/project/fancyupload/3-0/showcase/photoqueue/" target="_blank">FancyUpload</a> is a file-input replacement which features an unobtrusive, multiple-file selection menu and queued upload with an animated progress bar. It is easy to setup, is server independent, completely styleable via CSS and XHTML and uses MooTools to work in all modern browsers.</p>
<p>The official website of this plugin is <a href="http://digitarald.de/project/fancyupload/3-0/showcase/photoqueue/" target="_blank">Fancy Upload</a></p>
<h3>3) AJAX Multiple Upload File form using jQuery</h3>
<p><img class="aligncenter size-full wp-image-370" title="ajax-3" src="http://www.exclusivetutorials.com/wp-content/uploads/2010/06/ajax-3.png" alt="Ajax Uploader" width="574" height="250" /></p>
<p>Its another version of fileuploader from webdeveloperplus using the jQuery library and AJAX Upload by Andrew Valums. The official website of this uploader is<a href="http://webdeveloperplus.com/jquery/ajax-multiple-file-upload-form-using-jquery/" target="_blank"> webdeveloperplus</a></p>
<h3>4) Uploadify</h3>
<p><img class="aligncenter size-full wp-image-373" title="ajax-2" src="http://www.exclusivetutorials.com/wp-content/uploads/2010/06/ajax-2.png" alt="Ajax Uploader" width="574" height="250" /></p>
<p>Uploadify is a jQuery plugin that allows the easy integration of a multiple (or single) file uploads on your website. It requires Flash and any backend development language. An array of options allow for full customization for advanced users, but basic implementation is so easy that even coding novices can do it.</p>
<p>The official website of this plugin is <a href="http://www.uploadify.com/" target="_blank">Uploadify</a></p>
<h3>5) LightLoader</h3>
<p><img class="aligncenter size-full wp-image-376" title="ajax-5" src="http://www.exclusivetutorials.com/wp-content/uploads/2010/06/ajax-5.png" alt="Ajax Uploader" width="574" height="250" /></p>
<p>LightLoader uses a similar method which is found in the GMail file upload, using a hidden IFRAME to post the file and AJAX to check the progress. There is also a tester script in the zip file for you to upload to your server to make sure that you have all the settings correct.</p>
<p>The official website of this plugin is <a href="http://seemysites.net/projFolder/uploader/" target="_blank">LightLoader</a></p>
<p><span style="color: #ff0000;">I believe you people will like this post. Kindly share it on your social networks and do not forget to post your comments.</span></p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li><li><a href='http://www.exclusivetutorials.com/html5-tags/' rel='bookmark' title='Permanent Link: HTML5 New Tags'>HTML5 New Tags</a> <small>HTML 5 comes with variety of new tags which definitely...</small></li><li><a href='http://www.exclusivetutorials.com/typography-solutions-flir-and-sifr/' rel='bookmark' title='Permanent Link: Typography Solutions &#8211; Flir and sIFR'>Typography Solutions &#8211; Flir and sIFR</a> <small>I really not satisfied with the lack of support for...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/best-ajax-file-uploaders/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Image Magick and GD library installation on FEDORA server</title>
		<link>http://www.exclusivetutorials.com/steps-to-install-imagemagick-and-gd-library/</link>
		<comments>http://www.exclusivetutorials.com/steps-to-install-imagemagick-and-gd-library/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 18:29:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=349</guid>
		<description><![CDATA[If you are dealing with the images in PHP then ImageMagick and GD libraries are must components on your server. Nowadays image processing is a vital part of any average level website.<br /> 
<a href='http://www.exclusivetutorials.com/steps-to-install-imagemagick-and-gd-library/'>Continue Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/memcached-server-installation/' rel='bookmark' title='Permanent Link: Memcached Server Installation and Access with PHP'>Memcached Server Installation and Access with PHP</a> <small>An exclusive tutorial about MEMCACHED Server, its simple installation method...</small></li><li><a href='http://www.exclusivetutorials.com/setting-multiple-websites-in-codeigniter-installation/' rel='bookmark' title='Permanent Link: Setting Multiple Websites in Codeigniter Installation'>Setting Multiple Websites in Codeigniter Installation</a> <small>In this tutorial, I want to demonstrate that how to...</small></li><li><a href='http://www.exclusivetutorials.com/typography-solutions-flir-and-sifr/' rel='bookmark' title='Permanent Link: Typography Solutions &#8211; Flir and sIFR'>Typography Solutions &#8211; Flir and sIFR</a> <small>I really not satisfied with the lack of support for...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>PHP scripting language is mostly used to manipulate and create image files in various different image formats including GIF, PNG, JPEG, WBMP, and XPM with the help of GD. Also PHP can output image streams directly to a browser.</p>
<p>ImageMagick is an open source software suite for displaying, converting, and editing raster image files. It can read and write more than 100 image file formats.</p>
<p>So lets start with its installation. I am going to explain 10 easy step to achieve this.</p>
<h2>Step : 1</h2>
<pre class="general">
yum install php-gd
</pre>
<p></p>
<h2>Step : 2</h2>
<pre class="general">
yum install glib
</pre>
<p></p>
<h2>Step : 3</h2>
<pre class="general">
yum install glib2
</pre>
<p></p>
<h2>Step : 4</h2>
<pre class="general">
yum install libpng
</pre>
<p></p>
<h2>Step : 5</h2>
<pre class="general">
yum install libjpeg
</pre>
<p></p>
<h2>Step : 6</h2>
<pre class="general">
yum install libtiff
</pre>
<p></p>
<h2>Step : 7</h2>
<pre class="general">
yum install ghostscript
</pre>
<p></p>
<h2>Step : 8</h2>
<pre class="general">
yum install freetype
</pre>
<p></p>
<h2>Step : 9</h2>
<pre class="general">
yum install ImageMagick
</pre>
<p></p>
<h2>Step : 10</h2>
<pre class="general">
yum install ImageMagick-perl
</pre>
<p>I believe that by implementing these steps, any one can install the ImageMagick and GD libraries on FEDORA SERVER</p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/memcached-server-installation/' rel='bookmark' title='Permanent Link: Memcached Server Installation and Access with PHP'>Memcached Server Installation and Access with PHP</a> <small>An exclusive tutorial about MEMCACHED Server, its simple installation method...</small></li><li><a href='http://www.exclusivetutorials.com/setting-multiple-websites-in-codeigniter-installation/' rel='bookmark' title='Permanent Link: Setting Multiple Websites in Codeigniter Installation'>Setting Multiple Websites in Codeigniter Installation</a> <small>In this tutorial, I want to demonstrate that how to...</small></li><li><a href='http://www.exclusivetutorials.com/typography-solutions-flir-and-sifr/' rel='bookmark' title='Permanent Link: Typography Solutions &#8211; Flir and sIFR'>Typography Solutions &#8211; Flir and sIFR</a> <small>I really not satisfied with the lack of support for...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/steps-to-install-imagemagick-and-gd-library/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Ajax Validation with Jquery</title>
		<link>http://www.exclusivetutorials.com/ajax-validation-with-jquery/</link>
		<comments>http://www.exclusivetutorials.com/ajax-validation-with-jquery/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 17:59:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=321</guid>
		<description><![CDATA[This is a very informative tutorial for developers who want to use AJAX validation in their forms. I am going to explain that how to implement this with the help of jQuery. <br /><br /><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery'>Continue Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/best-ajax-file-uploaders/' rel='bookmark' title='Permanent Link: Top 5 AJAX File Uploaders'>Top 5 AJAX File Uploaders</a> <small>File Uploading is a basic part of any Blogging, CMS...</small></li><li><a href='http://www.exclusivetutorials.com/designing-a-beautiful-contact-form/' rel='bookmark' title='Permanent Link: Designing a beautiful Contact Form'>Designing a beautiful Contact Form</a> <small>I hope that this will be an interesting tutorial for...</small></li><li><a href='http://www.exclusivetutorials.com/automatic-database-backup/' rel='bookmark' title='Permanent Link: 3 simple steps for automatic database backup'>3 simple steps for automatic database backup</a> <small>This is a short tutorial that demonstrates that to take...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>In simple words, Ajax can execute the request without refreshing the page. There is no doubt that its a very cool client-side feature but for the safe end its a recommended practice to use server-side validation as well. This is because if some malicious user turn off the javascript then he can simply bypass the ajax validations.</p>
<p><strong>Step 1: Loading jQuery and its Plugins<br />
</strong></p>
<p>To apply this validation, you have to include two javascript files. These files are related to jQuery. One file is the jQuery library file, while the other one is the plugin for main jQuery library. Now there are two ways to load the files.</p>
<p>1) Load the files locally within your site<br />
2) Reference the files online through google API libraries</p>
<pre class="html">
<span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
<span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.min.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
</pre>
<p>I am loading the minified version of the javascript to reduce the file size</p>
<p><strong>Step 2: HTML Form</strong></p>
<p>Now let’s start the HTML form.  Now you  see a form with fields i.e.  name, email and two password fields.</p>
<pre class="html">
<span class="htmlFormTag">&lt;form id=<span class="htmlAttributeValue">&quot;ajaxform&quot;</span> action=<span class="htmlAttributeValue">&quot;#&quot;</span> method=<span class="htmlAttributeValue">&quot;post&quot;</span>&gt;</span>
<span class="htmlOtherTag">&lt;fieldset&gt;</span><span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;name&quot;</span>&gt;</span>Name:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input name=<span class="htmlAttributeValue">&quot;name&quot;</span> type=<span class="htmlAttributeValue">&quot;text&quot;</span> /&gt;</span><span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;email&quot;</span>&gt;</span>Email:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input name=<span class="htmlAttributeValue">&quot;email&quot;</span> type=<span class="htmlAttributeValue">&quot;text&quot;</span> /&gt;</span><span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;password&quot;</span>&gt;</span>Password:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input id=<span class="htmlAttributeValue">&quot;password&quot;</span> name=<span class="htmlAttributeValue">&quot;password&quot;</span> type=<span class="htmlAttributeValue">&quot;password&quot;</span> /&gt;</span><span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;password_again&quot;</span>&gt;</span>Re-enter Password:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input id=<span class="htmlAttributeValue">&quot;password_again&quot;</span> name=<span class="htmlAttributeValue">&quot;password_again&quot;</span> type=<span class="htmlAttributeValue">&quot;password&quot;</span> /&gt;</span> <span class="htmlFormTag">&lt;input name=<span class="htmlAttributeValue">&quot;submit&quot;</span> type=<span class="htmlAttributeValue">&quot;submit&quot;</span> value=<span class="htmlAttributeValue">&quot;Submit&quot;</span> /&gt;</span><span class="htmlOtherTag">&lt;/fieldset&gt;</span>
<span class="htmlFormTag">&lt;/form&gt;</span></pre>
<p><strong>Step 3: Initialize jQuery and its Plugin </strong></p>
<p>Initialize the jQuery library and its plugin</p>
<pre class="html">
<span class="htmlScriptTag">&lt;script type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span>// <span class="htmlOtherTag">&lt;![CDATA[
         $(document).ready(function(){
         $(&quot;#ajaxform&quot;).validate();     });
// ]]&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
</pre>
<p>This code says that when the document(DOM) is ready, just  run a function. That function is to validate the form with the ID of “ajaxform”. You have now successfully initialized the plugin. Although the plugin is now listening on your requirements, it will not act until you tell it what to look for. In the next step we will do just that!</p>
<p><strong>Step 4: Validation</strong><br />
There are two ways to apply conditions and requirements. Let me tell you the  easy way first and then the more complex way but much more customizable. Firstly,  we want to simply make sure the “name” field and “email” field is filled in. We don’t want any blank inputs there. The easiest way to do this is simply add a class of “required” to each inputs that you would like for the plugin to check.</p>
<pre class="html">
<span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;name&quot;</span>&gt;</span>Name:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input class=<span class="htmlAttributeValue">&quot;required&quot;</span> name=<span class="htmlAttributeValue">&quot;name&quot;</span> type=<span class="htmlAttributeValue">&quot;text&quot;</span> /&gt;</span> <span class="htmlOtherTag">&lt;label for=<span class="htmlAttributeValue">&quot;email&quot;</span>&gt;</span>Email:<span class="htmlOtherTag">&lt;/label&gt;</span>
<span class="htmlFormTag">&lt;input class=<span class="htmlAttributeValue">&quot;required email&quot;</span> name=<span class="htmlAttributeValue">&quot;email&quot;</span> type=<span class="htmlAttributeValue">&quot;text&quot;</span> /&gt;</span>
 </pre>
<p>The important thing is to note that I added the class “required” to both input fields and the email input field has “email” as a class as well. The reason for this is we are telling the plugin to make sure this field is required and also conforms to a valid email address format.</p>
<p><strong>Step 5: Customization</strong></p>
<p style="text-align: justify;">You can easily notice that how easy it was to validate the name and email fields with jQuery validation, let’s take a look at the password fields. What we want here is to make both password fields required but also match a certain length of characters. Furthermore, the second password input needs to match the first one. See this</p>
<p>In the same section where you added the initialization of the jQuery inside the head section of the HTML, add the following lines.</p>
<pre class="html">
<span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span> <span class="htmlScriptTag">&lt;script src=<span class="htmlAttributeValue">&quot;http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.min.js&quot;</span> type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
<span class="htmlScriptTag">&lt;script type=<span class="htmlAttributeValue">&quot;text/javascript&quot;</span>&gt;</span>// <span class="htmlOtherTag">&lt;![CDATA[
       $(document).ready(function(){
       $(&quot;#ajaxform&quot;).validate({ 	rules: { 	password: {required: true, minlength: 6}, 	password_again: {required: true, equalTo: &quot;#password&quot;} 	} 		});  });
// ]]&gt;</span><span class="htmlScriptTag">&lt;/script&gt;</span>
</pre>
<p style="text-align: justify;">Now rules have added with password being required set to true and it needs a minlength of 6 and the second condition is for password_again set to required true and it has to “equalTo” the input field with id of password. With these conditions set, we are able to achieve what we are wanting. Do not forget to check the demo of the post to see how it works. For more documentation and resource on this plugin visit jQuery Validation Plugin</p>
<p>I believe that this tutorial has very helpful and you will put it to good use.</p>
<p>Finally, checkout the <a title="Ajax Validations Demo" href="http://www.exclusivetutorials.com/wp-content/uploads/posts/form_validations.html" target="_blank">demo </a>at this link. You can also download the files from <a href="http://www.exclusivetutorials.com/wp-content/uploads/posts/form_validations.rar">here</a>.</p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/best-ajax-file-uploaders/' rel='bookmark' title='Permanent Link: Top 5 AJAX File Uploaders'>Top 5 AJAX File Uploaders</a> <small>File Uploading is a basic part of any Blogging, CMS...</small></li><li><a href='http://www.exclusivetutorials.com/designing-a-beautiful-contact-form/' rel='bookmark' title='Permanent Link: Designing a beautiful Contact Form'>Designing a beautiful Contact Form</a> <small>I hope that this will be an interesting tutorial for...</small></li><li><a href='http://www.exclusivetutorials.com/automatic-database-backup/' rel='bookmark' title='Permanent Link: 3 simple steps for automatic database backup'>3 simple steps for automatic database backup</a> <small>This is a short tutorial that demonstrates that to take...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/ajax-validation-with-jquery/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>HTML5 New Tags</title>
		<link>http://www.exclusivetutorials.com/html5-tags/</link>
		<comments>http://www.exclusivetutorials.com/html5-tags/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 14:40:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Html]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=294</guid>
		<description><![CDATA[HTML 5 comes with variety of new tags which definitely reduces work length . It aims to reduce the need for proprietary plug-in-based rich internet application (RIA) technologies such as  Silverlight, Flash, Pivot &#038; Sun JavaFX.


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li><li><a href='http://www.exclusivetutorials.com/benefits-of-output-buffering/' rel='bookmark' title='Permanent Link: Benefits of Output Buffering'>Benefits of Output Buffering</a> <small>If you are not using PHP Output Buffering, you have...</small></li><li><a href='http://www.exclusivetutorials.com/designing-a-beautiful-contact-form/' rel='bookmark' title='Permanent Link: Designing a beautiful Contact Form'>Designing a beautiful Contact Form</a> <small>I hope that this will be an interesting tutorial for...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Some new features in HTML 5 are functions to embedd audio, video, graphics, client-side data storage, and interactive documents. It also contains new elements like &lt;nav&gt;, &lt;header&gt;, &lt;footer&gt;, and &lt;figure&gt;. On the other hand,Html 5 is not a  W3C recommendation yet!</p>
<h2>1. article</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;article&gt;</span><span class="htmlOtherTag">&lt;/article&gt;</span>
</pre>
<p>The &lt;article&gt; tag defines external content.</p>
<p>The external content could be a news-article  from an external provider, or a text from a web log (blog), or a text from a  forum, or any other content from an external source.</p>
<h2>2. audio</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;audio&gt;</span><span class="htmlOtherTag">&lt;/audio&gt;</span>
</pre>
<p>The &lt;audio&gt; tag defines sound, such as music or other audio streams.</p>
<h2>3. canvas</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;canvas&gt;</span><span class="htmlOtherTag">&lt;/canvas&gt;</span>
</pre>
<p>The &lt;canvas&gt; tag is used to display graphics.The &lt;canvas&gt; tag is only a container for graphics, you must use  a script to actually paint graphics.</p>
<h2>4. footer</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;footer&gt;</span><span class="htmlOtherTag">&lt;/footer&gt;</span>
</pre>
<p>The &lt;footer&gt; tag defines the footer of a section or document. Typically contains the name of the author, the date the document was written and/or contact information.</p>
<h2>5. header</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;header&gt;</span><span class="htmlOtherTag">&lt;/header&gt;</span>
</pre>
<p>The &lt;header&gt; tag defines an introduction to the document.</p>
<h2>6. hgroup</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;hgroup&gt;</span><span class="htmlOtherTag">&lt;/hgroup&gt;</span>
</pre>
<p>The  tag defines the heading of a section or a document. The hgroup element is used to group headers, &lt;h1&gt; to &lt;h6&gt;, where the largest is the main heading of the section, and the others are sub-headings.</p>
<h2>7. keygen</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;keygen&gt;</span><span class="htmlOtherTag">&lt;/keygen&gt;</span>
</pre>
<p>The &lt;keygen&gt; tag defines a generated key.</p>
<h2>8. mark</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;mark&gt;</span><span class="htmlOtherTag">&lt;/mark&gt;</span>
</pre>
<p>The &lt;mark&gt; tag defines marked text. Use the &lt;mark&gt; tag if you want to  highlight parts of your text</p>
<h2>9. nav</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;nav&gt;</span><span class="htmlOtherTag">&lt;/nav&gt;</span>
</pre>
<p>The &lt;nav&gt; tag defines a section of navigation.</p>
<h2>10. output</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;output&gt;</span><span class="htmlOtherTag">&lt;/output&gt;</span>
</pre>
<p>The &lt;output&gt; tag defines different types of output, such as output written by  a script.</p>
<h2>11. progress</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;progress&gt;</span><span class="htmlOtherTag">&lt;/progress&gt;</span>
</pre>
<p>The &lt;progress&gt; tag defines work-in-progress. Use the progress element to  display the progress of a time consuming function in JavaScript.</p>
<h2>12. rp</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;rp&gt;</span><span class="htmlOtherTag">&lt;/rp&gt;</span>
</pre>
<p>The &lt;rp&gt; tag is used in ruby annotations, to define what to show  browsers that do not support the ruby element. A ruby annotation is Chinese notes or characters. Used in East Asia, to show the pronunciation of East Asian characters. Use together with the &lt;ruby&gt; and the &lt;rt&gt; tags: The ruby element consists of one or more characters (that needs an  explanation/pronunciation), and a rt element that gives that information, and  optionally a rp element that defines what to show browsers that do not support the &#8220;ruby&#8221;  tag.</p>
<h2>13. rt</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;rt&gt;</span><span class="htmlOtherTag">&lt;/rt&gt;</span>
</pre>
<p>The &lt;rt&gt; tag defines an explanation or pronunciation of characters (Chinese notes or characters). Used in East Asia, to show the pronunciation of East Asian characters.</p>
<p>Use together with the &lt;ruby&gt; and the &lt;rp&gt; tags: The ruby element consists of one or more characters (that needs an  explanation/pronunciation), and a rt element that gives that information, and  optionally a rp element that defines what to show browsers that do not support the &#8220;ruby&#8221;  tag.</p>
<h2>14. ruby</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;ruby&gt;</span><span class="htmlOtherTag">&lt;/ruby&gt;</span>
</pre>
<p>The &lt;ruby&gt; tag defines a ruby annotation (Chinese notes or characters). Used in East Asia, to show the pronunciation of East Asian characters. Use together with the &lt;rt&gt; and/or the &lt;rp&gt; tags: The ruby element consists of one or more characters (that needs an  explanation/pronunciation), and a rt element that gives that information, and  optionally a rp element that defines what to show browsers that do not support the &#8220;ruby&#8221;  tag.</p>
<h2>15. section</h2>
<pre class="html">
<span class="htmlOtherTag">&lt;section&gt;</span><span class="htmlOtherTag">&lt;/section&gt;</span>
</pre>
<p>The &lt;section&gt; tag defines sections in a document. Such as chapters,  headers, footers, or any other sections of the document.</p>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li><li><a href='http://www.exclusivetutorials.com/benefits-of-output-buffering/' rel='bookmark' title='Permanent Link: Benefits of Output Buffering'>Benefits of Output Buffering</a> <small>If you are not using PHP Output Buffering, you have...</small></li><li><a href='http://www.exclusivetutorials.com/designing-a-beautiful-contact-form/' rel='bookmark' title='Permanent Link: Designing a beautiful Contact Form'>Designing a beautiful Contact Form</a> <small>I hope that this will be an interesting tutorial for...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/html5-tags/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>3 simple steps for automatic database backup</title>
		<link>http://www.exclusivetutorials.com/automatic-database-backup/</link>
		<comments>http://www.exclusivetutorials.com/automatic-database-backup/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 11:58:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[database]]></category>

		<guid isPermaLink="false">http://www.exclusivetutorials.com/?p=284</guid>
		<description><![CDATA[This is a short tutorial that demonstrates that to take a database backup automatically. It's short but very effective to take backup on regular intervals. <br /> <a href='http://www.exclusivetutorials.com/automatic-database-backup/'>Continue Reading</a>


Related posts:<ol><li><a href='http://www.exclusivetutorials.com/how-to-secure-wordpress-blog/' rel='bookmark' title='Permanent Link: How To Secure WordPress Blog'>How To Secure WordPress Blog</a> <small>There are various reasons that why it is important to...</small></li><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li><li><a href='http://www.exclusivetutorials.com/website-security-tips/' rel='bookmark' title='Permanent Link: Important Website Security Tips'>Important Website Security Tips</a> <small>Website Security is a very important subject and always needs...</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>Just follow below 3 steps and everything is under control :</p>
<h2>Step 1: Setup backup folder on a server</h2>
<pre class="html">
mkdir /var/lib/mysqlbackup
cd /var/lib/mysqlbackup
</pre>
<h2>Step 2: Write backup script</h2>
<pre class="html">
vi dbbackup.sh
</pre>
<p>Paste the content as below and change the username, password and dbname as required</p>
<pre class="html">
#!/bin/sh
# Username to access the MySQL server
USERNAME=<span class="htmlAttributeValue">&quot;username&quot;</span>
# Username to access the MySQL server
PASSWORD=<span class="htmlAttributeValue">&quot;password&quot;</span>
# List of DBNAMES for Backup
DBNAME=<span class="htmlAttributeValue">&quot;dbname&quot;</span>
#date timestamp for log message
DATE=`/bin/date +%Y-%m-%d_%Hh%Mm`
#output file
OUTDIR=<span class="htmlAttributeValue">&quot;/var/lib/mysqlbackup/&quot;</span>
OUTFILE=<span class="htmlAttributeValue">&quot;ip_bindass&quot;</span>.$DATE.&quot;sql.gz&quot;
#working directory
DIR=<span class="htmlAttributeValue">&quot;/var/lib/mysqlbackup/&quot;</span>
#cd $DIR
# MySQL Backup
/usr/bin/mysqldump --database $DBNAME --opt --single-transaction -u$USERNAME -p$PASSWORD | /usr/bin/gzip -9 &gt; $OUTDIR$OUTFILE
</pre>
<p>Finally change the permission of the  script to make it executable</p>
<pre class="html">
chmod +x dbbackup.sh
</pre>
<h2>Step3: To Schedule script in crontab file</h2>
<pre class="html">
crontab -e
</pre>
<p>Add below like to take backup everyday at 3.20 pm</p>
<pre class="html">
20 15 * * * /var/lib/mysqlbackup/dbbackup.sh
</pre>


<p>Related posts:<ol><li><a href='http://www.exclusivetutorials.com/how-to-secure-wordpress-blog/' rel='bookmark' title='Permanent Link: How To Secure WordPress Blog'>How To Secure WordPress Blog</a> <small>There are various reasons that why it is important to...</small></li><li><a href='http://www.exclusivetutorials.com/ajax-validation-with-jquery/' rel='bookmark' title='Permanent Link: Ajax Validation with Jquery'>Ajax Validation with Jquery</a> <small>This is a very informative tutorial for developers who want...</small></li><li><a href='http://www.exclusivetutorials.com/website-security-tips/' rel='bookmark' title='Permanent Link: Important Website Security Tips'>Important Website Security Tips</a> <small>Website Security is a very important subject and always needs...</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.exclusivetutorials.com/automatic-database-backup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

