<?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>Technology Forum</title>
	<atom:link href="http://technology.freenetsolutions.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.freenetsolutions.com</link>
	<description>SEO, Speed Up website, Server Optimization, Linux, Open Source Softwares</description>
	<lastBuildDate>Tue, 17 Jan 2012 13:09:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Hewlett Packard (HP) Journey</title>
		<link>http://technology.freenetsolutions.com/hewlett-packard-hp-journey/</link>
		<comments>http://technology.freenetsolutions.com/hewlett-packard-hp-journey/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 12:42:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[IT Companies]]></category>
		<category><![CDATA[Bill Hewlett]]></category>
		<category><![CDATA[Dave Packard]]></category>
		<category><![CDATA[RISC architecture]]></category>
		<category><![CDATA[RISC Computer]]></category>

		<guid isPermaLink="false">http://technology.freenetsolutions.com/?p=20</guid>
		<description><![CDATA[1938 &#8211; HP invented its first product the HP Model 200A which was used to test sound equipment.  The Walt Disney Company subsequently ordered 8 units of the HP Model 200B to prepare movie theatres to show Fantasia. 1938 &#8211; Bill Hewlett and Dave Packard formalized their partnership on 1 January 2939.  A coin was [...]]]></description>
			<content:encoded><![CDATA[<p></p><ul>
<li><strong>1938 &#8211; </strong>HP invented its first product the HP Model 200A which was used to test sound equipment.  The Walt Disney Company subsequently ordered 8 units of the HP Model 200B to prepare movie theatres to show Fantasia.<strong><br />
</strong></li>
<li><strong>1938</strong> &#8211; Bill Hewlett and Dave Packard formalized their partnership on 1 January 2939.  A coin was flipped to decide the company&#8217;s name.</li>
<li><strong>1947</strong> &#8211; HP was incorported on August 18.  Dave Packard was named President, Bill Hewlett, Vice-President.</li>
<li><strong>1956</strong> &#8211; HP produced its first oscilloscopes, which went on to represent a significant part of HP&#8217;s test and measurement product line.</li>
<li><strong>1957</strong> &#8211; HP held its IPO on November 6, with shares selling for $ 16 (U.S.).  The IPO was issued for two reasons: to help with estate planning for its founders and to enable employees to share in the company.</li>
<li><strong>1966</strong> &#8211; HP introduced its first computer, the HP 2116A.  The world&#8217;s first go-anywhere, do-anything computer, it was designed to withstand environmental extremes.</li>
<li><strong>1968</strong> &#8211; HP introduced the world&#8217;s first desktop scientific calculator, the HP 9100A.  It was ten times faster than most machines at solving science and engineering problems.  Ads called it a &#8220;personal computer,&#8221; one of the first documented uses of the term.</li>
<li><strong>1972</strong> &#8211; HP entered business computing with the HP 3000 which introduced the era of distributed data processing.</li>
<li><strong><span id="more-20"></span>1972</strong> &#8211; HP introduced the HP-35, the world&#8217;s first scientific hand-held calculator.  It was small enough to fit in a shirt packet and made the slide rule obsolete.  In 2000, Forbes ASAP named the HP-35 one of the &#8220;all time products&#8221; that changed the world.</li>
<li><strong>1974</strong> &#8211; HP introduced the first minicomputer based on 4K dynamic random access memory chips (DRAM) rather than magnetic cores.</li>
<li><strong>1981 </strong>- HP introduced the HP-12C business calculator. It went on to become the world&#8217;s standard financial calculator and is still being sold by HP today.</li>
<li><strong>1981</strong> &#8211; HP introduced the HP 9000 technical computer, the first desktop mainframe which was as powerful as the room sized computers of the 1960s.</li>
<li><strong>1984</strong> &#8211; HP introduced thermal inkjet printing with the debut of the HP ThinkJet.</li>
<li><strong>1984 </strong>- The HP LaserJet quickly became the most popular personal desktop laser printer.</li>
<li><strong>1986</strong> &#8211; HP created RISC architecture which made computers faster and less expensive.</li>
<li><strong>1987 </strong>- HP began its hardware recycling program</li>
<li><strong>1991 </strong>- The affordable DeskJet 500C was introduced which revolutionized color printing.</li>
<li><strong>1993 </strong>- HP introduced the 3-pound (1.4 Kilogram) HP Omniook 300, a superportable PC with extended battery life.</li>
<li><strong>1994 </strong>- HP introduced the HP OfficeJet personal printer-fax-copier, the world&#8217;s first mass-market all-in-one device.</li>
<li><strong>1999 </strong>- HP announced the spinoff of Agilent Technologies, which consisted of HP&#8217;s former measurement, components, chemical analysis and medical businesses.</li>
<li><strong>2002 </strong>- HP and Compaq merged.</li>
<li><strong>2002 </strong>- HP acquired Indigo to accelerate its lead in digital publishing.</li>
<li><strong>2004 </strong>- HP rolled out digital entertainment products.</li>
<li><strong>2005 </strong>- HP was named Most Trusted Company for Privacy in the United States by TRUSTe and Ponemon Institute.  The award recognized HP for establishing and enforcing progressive privacy practices that built a high level of consumer trust.</li>
<li><strong>2010</strong> &#8211; HP reached a milestone by producing 1 billion HP ink cartridges containing post-consumer recycled plastic.</li>
<li><strong>2010</strong> &#8211; The HP Compaq 8000f Elite Ultra Slim Desktop PC, the industry&#8217;s first Microsoft Windows® based desktop PC to be free of brominated flame retardants (BFRs) and polyvinyl chloride (PVC) from the wall to the mouse.</li>
<li><strong>2011</strong> &#8211; HP unveiled its first touchscreen desktop PCs to feature a 60-degree reclining display, enabling users to adjust the display&#8217;s position for a comfortable user experience.</li>
</ul>
<table>
<tbody>
<tr>
<td>&#8220;The fundamental basis for success in the operation of Helwett-Packard is the job we do in satisfying the needs of our customers&#8221;</p>
<p style="text-align: center;">- <em><strong>Dave Packard</strong></em></p>
</td>
</tr>
<tr>
<td>&#8220;Right from the beginning, Bill and I knew we didn&#8217;t want to be a &#8216;me too&#8217; company merely copying products already on the market.  To this day, HP continually strives to develop products that represent true advancement.&#8221;</p>
<p style="text-align: center;">- <em><strong>Dave Packard</strong></em></p>
</td>
</tr>
</tbody>
</table>
<p>Copyright &#8211; Hewlett Packard (HP) &#8211; The contains are taken from HP publications/information brochures.</p>
]]></content:encoded>
			<wfw:commentRss>http://technology.freenetsolutions.com/hewlett-packard-hp-journey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>History of the Internet</title>
		<link>http://technology.freenetsolutions.com/history-of-the-internet/</link>
		<comments>http://technology.freenetsolutions.com/history-of-the-internet/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 07:40:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Apple launched the iTunes Store]]></category>
		<category><![CDATA[April Fool's Joke]]></category>
		<category><![CDATA[ARPANET]]></category>
		<category><![CDATA[AuctionWeb]]></category>
		<category><![CDATA[BITNET]]></category>
		<category><![CDATA[CERN]]></category>
		<category><![CDATA[Coaxial Cables]]></category>
		<category><![CDATA[CompuServe]]></category>
		<category><![CDATA[CREN]]></category>
		<category><![CDATA[CSNET]]></category>
		<category><![CDATA[DARPA]]></category>
		<category><![CDATA[Dot-Com bubble burst]]></category>
		<category><![CDATA[eBay]]></category>
		<category><![CDATA[Ethernet Cables]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[first commercial dial-up internet]]></category>
		<category><![CDATA[First Spam Email]]></category>
		<category><![CDATA[GIF]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google announced the launch of Gmail]]></category>
		<category><![CDATA[Graphics Interchange Format]]></category>
		<category><![CDATA[Hotmail]]></category>
		<category><![CDATA[IETF]]></category>
		<category><![CDATA[Importance of the Network]]></category>
		<category><![CDATA[Intergalactic Network]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Internet Engineering Task Force]]></category>
		<category><![CDATA[Internet2]]></category>
		<category><![CDATA[LAN]]></category>
		<category><![CDATA[MAILBOX]]></category>
		<category><![CDATA[Mobile Data Traffic Exceeded]]></category>
		<category><![CDATA[Mosaic]]></category>
		<category><![CDATA[Mosaic for X]]></category>
		<category><![CDATA[Napster]]></category>
		<category><![CDATA[National Science Foundation]]></category>
		<category><![CDATA[NCSA]]></category>
		<category><![CDATA[Netscape]]></category>
		<category><![CDATA[NSF]]></category>
		<category><![CDATA[NSFNET]]></category>
		<category><![CDATA[PayPal]]></category>
		<category><![CDATA[Pizza Hut offered online ordering]]></category>
		<category><![CDATA[Secure Socket Layer]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Sun Microsystems]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[TCP/IP]]></category>
		<category><![CDATA[Transmission Control Protocol]]></category>
		<category><![CDATA[Transmission Control Protocol over Internet Protocol]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[WAN]]></category>
		<category><![CDATA[Wi-fi]]></category>
		<category><![CDATA[Wide Area Network]]></category>
		<category><![CDATA[Wikipedia is launched]]></category>
		<category><![CDATA[World Wide Web]]></category>
		<category><![CDATA[YouTube is launched]]></category>

		<guid isPermaLink="false">http://technology.freenetsolutions.com/?p=13</guid>
		<description><![CDATA[1962 - J.C.R. Licklider (1915-1990) introduced the idea of an &#8216;Intergalactic Network:  His idea involved a global computer network that allowed everyone to access information from anywhere in the world. He became head of Defence Advanced Research Project Agency (DARPA/APRA), convincing his successors of the importance of the network. 1965 &#8211; MAILBOX was the first [...]]]></description>
			<content:encoded><![CDATA[<p></p><ul>
<li><span style="color: #339966;"><strong>1962 </strong></span>- J.C.R. Licklider (1915-1990) introduced the <em><strong>idea of an &#8216;Intergalactic Network</strong></em>:  His idea involved a global computer network that allowed everyone to access information from anywhere in the world. He became head of Defence Advanced Research Project Agency (DARPA/APRA), convincing his successors of the importance of the network.</li>
<li><span style="color: #339966;"><strong>1965</strong></span> &#8211; <strong>MAILBOX</strong> was the first email system. It was first used at Massachusetts Institute of Technology.<span id="more-13"></span></li>
<li><span style="color: #339966;"><strong>1972</strong></span> &#8211; Ray Tomlinson &#8211; invented the addressing the email message. Tomlinson worked for Bolt Beranek and Newman as an ARPANET contractor.  He chose the <strong>@ symbol </strong>from the keyboard to denote sending messages from one computer to another.</li>
<li><strong><span style="color: #339966;">1974</span></strong> &#8211; Vint Cerf and Bob Kahn used the term &#8220;<em><strong>Internet</strong></em>&#8221; in a Transmission Control Protocol (TC) paper.</li>
<li><span style="color: #339966;"><strong>1976</strong></span> &#8211; Dr. Robert Metcalfe invented <em><strong>Ethernet, Coaxial Cables </strong></em>that quickly transport data.  Ethernet was an important aspect in developing Local Area Networks (LAN), which is a computer network that covers a small area, like a home, office, or school.</li>
<li><span style="color: #339966;"><strong>1978</strong> </span>- Gray Thuerk sent the <em><strong>first spam email</strong></em> to 400 users of ARPANET advertising his DEC&#8217;s new range of minicomputers.</li>
<li><span style="color: #339966;"><strong>1981</strong></span> &#8211; <strong>BITNET and CSNET </strong>networking projects were initiated. BITNET adopted the IBM RSCS protocol suite and featured direct leased line connections between participating sites.CSNET was initially funded by the NSF to provide networking for univeristy industry and government computer science research groups.</li>
<li><strong><span style="color: #339966;">1983</span></strong> &#8211; On January 1, 1983, every machine connected to ARPANET was <em><strong>required to use TCP/IP</strong></em> (Transmission Control Protocol over Internet Protocol).  This became the core of the Internet.</li>
<li><span style="color: #339966;"><strong>1984</strong></span> &#8211; Dr. Jon Postel described his idea for .com, .org, .gov, .edu, and .mil in a series of papers published by the Internet Engineering Task Force.</li>
<li><span style="color: #339966;"><strong>1985</strong></span> &#8211; Dennis Jennings joined the National Science Foundation and determines that <em><strong>TCP/IP should be mandatory </strong></em>for the entire NSFNET program.When Steve Wolff took over a year later, he determined that the academic/research community needed a something outside of government funding.  They would need a Wide Area Network (WAN), which connects LAN.</li>
<li><span style="color: #339966;"><strong>1987</strong></span> &#8211; CompuServe accidentally released the <strong>Graphics Interchange Format (GIF) image</strong>,  not knowing there was a patent pending on the technology.BITNET and CSNET merged to form the Corporation for Research and Educational Networking (CREN).</li>
<li><span style="color: #339966;"><strong>1989</strong></span> &#8211; The World, an Internet Service Provider (IS), offered the <strong>first commercial dial-up internet</strong>. Netom, which was established in 1988, did not serve the public until The World, also founded in 1989, Panix was the third ISP.</li>
<li><span style="color: #339966;"><strong>1992</strong></span> &#8211; Corporation for Research and Educational Networking (CREN) released the World Wide Web. NSFNET is upgraded to 44.739 Mbps.</li>
<li><span style="color: #339966;"><strong>1993</strong></span> &#8211; Marc Andreessen, NCSA,  and the University of Illinois developed &#8220;<strong>Mosaic for X</strong>,&#8221; a graphical interface for the World Wide Web.  Mosaic was the first widely used internet browser.Marc Andreessen later founded Netscape in 1994.  His company also developed Secure Socket Layer (SSL), which encrypts and secures sensitive data.  It&#8217;s still the standard today.</li>
<li><span style="color: #339966;"><strong>1994</strong></span> &#8211; <em><strong>Pizza Hut offered online ordering </strong></em>through their website.</li>
<li><span style="color: #339966;"><strong>1995</strong></span> &#8211; Pierre Omidyar released AuctionWeb, which later became <strong>eBay</strong>.The NSA, overwhelmed with new hosts, determined that as of April 30, 1995, they would no longer allow access to the NSF backbone.  Instead, four providers could lease access. <em><strong> An annual fee was imposed </strong></em>for all domains, except those used by the government (.gov) or educational institutions (.edu).</li>
<li><span style="color: #339966;"><strong>1996</strong></span> &#8211; <strong>Internet2 </strong>is released. Internet2 is a network of research and educational institutions.Hotmail is launched.  Microsoft bought hotmail for $400 million the following year.</li>
<li><span style="color: #339966;"><strong>1998</strong></span> &#8211; Google receives funding from Andy Bechtolsheim (Sun Microsystems) becoming Google Technology Incorporated.<strong>Paypal </strong>is formed to make it easy for consumers to spend money online.</li>
<li><span style="color: #339966;"><strong>1999</strong></span> &#8211; Wi-fi, wireless internet technology, is standardised.Sean Fanning created and released his infamous <em><strong>Napster</strong></em>.  He was 18.</li>
<li><span style="color: #339966;"><strong>2000</strong></span> &#8211; The <strong>Dot-Com bubble burst</strong>, falling drastically after peaking at 5,048.62 on the NASDAQ.</li>
<li><span style="color: #339966;"><strong>2001</strong></span> &#8211; <em><strong>Wikipedia is launched </strong></em>eventually changing domains from .com to .org.</li>
<li><span style="color: #339966;"><strong>2003</strong></span> &#8211; Apple <em><strong>launched the iTunes Store </strong></em>with only 200,000 songs.  Within 24 hours they&#8217;d sold a quarter of million songs.</li>
<li><span style="color: #339966;"><strong>2004</strong></span> &#8211; On April 1, 2004 Google announced the launch of Gmail, which would offer 1GB of storage.  Because Hotmail and Yahoo were only offering 2MB and 4 MB respectively, some people thought it was an April Fool&#8217;s Joke</li>
<li><span style="color: #339966;"><strong>2005</strong></span> &#8211; <strong>YouTube is launched</strong>, revolutionizing web-based videos.  Google bought YouTube for $1.6 billion the following year.</li>
<li><span style="color: #339966;"><strong>2006</strong></span> &#8211; Dom Sagolla released <strong>Twitter</strong>.<br />
<strong>Facebook</strong>, once exclusive to college students, in made available to everyone.</li>
<li><span style="color: #339966;"><strong>2009</strong></span> &#8211; Mobile data traffic exceeded voice traffic every single month.  Globally, mobile data exceeded an exabyte (a billion gigabytes) for the first time.</li>
</ul>
<p><strong>Sources</strong>:</p>
<p>http://www.isoc.org/internet/history/brief.shtml, http://www.isoc.org/internet/history/cerf.shtml, http://www.historyofthings.com/, http://en.wikipedia.org/wiki/ARPANET, http://en.wikipedia.org/wiki/Internet_Protocol_Suite, http://gigaom.com/2009/02/01/a-brief-history-of-twitter,http://www.std.com, http://www.panix.com, http://www.zdnet.com.au, http://en.wikipedia.org</p>
]]></content:encoded>
			<wfw:commentRss>http://technology.freenetsolutions.com/history-of-the-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Security Tips</title>
		<link>http://technology.freenetsolutions.com/security-tips/</link>
		<comments>http://technology.freenetsolutions.com/security-tips/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 05:05:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[url rewriting]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Hosting]]></category>

		<guid isPermaLink="false">http://technology.freenetsolutions.com/?p=7</guid>
		<description><![CDATA[We are listing few of the security tips which can be helpful for novice/beginner to start web hosting or to provide hosting services.  We have taken all the care while listing all the information, If any body found the information is having problem please contact us. APACHE Security By Obscurity: The default Apache installation options [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>We are listing few of the security tips which can be helpful for novice/beginner to start web hosting or to provide hosting services.  We have taken all the care while listing all the information, If any body found the information is having problem please contact us.</p>
<p><strong>APACHE</strong></p>
<ul>
<li><strong>Security By Obscurity</strong>: The default Apache installation options cause the server to add a signature that shows what version of Apache you are running, what operating system it is running on and even what modules you are using in your Apache configuration. This information makes it easier to exploit your system since hackers will have a great deal of information about the types and versions of your software<strong><span id="more-7"></span></strong> and can easily search for vulnerabilities. To disable Apache’s signature and reduce the information included in the HTTP header, add the following options to your default httpd.conf file:<br />
ServerSignature Off<br />
ServerTokens Prod</li>
<li><strong>Separate user and group for Apache</strong>: Some older configurations that ran the server as root, it can be problematic. If one of these other systems is comprised, the attackers would also have access to your Apache server and files. Using a separate user and group for Apache is recommended. You can set these in httpd.conf using the following:<br />
User apache<br />
Group apache</li>
<li><strong>Control Directory and File Access</strong>: Apache has access controls that can be used to tighten your security. In particular, you want to block access to access to any files outside of your web root. The first is to add the following to your default httpd.conf file:&lt;Directory /&gt;<br />
Order Deny,Allow<br />
Deny from All<br />
Options None<br />
&lt;/Directory&gt;</li>
<li><strong>.htaccess</strong>: A common technique is to block access to .htaccess. However, there are also often other files for which you want to block access. You might want to block access to all files with a .inc extensions (PHP includes) since they may contain sensitive information (such as database details) or if you use the Subversion source control system, you may need to block the .svn files generated when doing a code checkout. To block a specific file such as .htaccess, add this to your httpd.conf:<br />
&lt;Files ~&#8221;^/.htacces&#8221;&gt;<br />
Order Deny,Allow<br />
Deny from All<br />
&lt;/Files&gt;</p>
<p>To hide all files that end in .svn, you can use the following:</p>
<p>&lt;Files ~&#8221;/.svn$&#8221;&gt;<br />
Order Deny,Allow<br />
Deny from All<br />
&lt;/Files&gt;</li>
<li><strong>Disable FollowSymLinks</strong>:  Symbolic links can expose files and directories on your file system that you did not intend to expose. Apache supports FollowSymLinks  as a setting for Options. When this option is set, Apache will allow a user to follow a symbolic link to a file that is outside of the web root. You can stop this behavior by using:Options Nonewithin a Directory block. Or if you are enabling other options you can use:
<p>Options -FollowSymLinks</li>
</ul>
<p><strong>PHP</strong></p>
<ul>
<li><strong>Kill Register Globals</strong>: PHP used global variables to provide access to input variables from GET and POST requests. his feature was done away with because it provided a security loophole. PHP provides the register_globals setting in php.ini. When this is on, PHP will provide the earlier behavior and register global variables for the input values. To secure your PHP, installation you should always turn this off. Avoid scripts that require register_globals as it is usually a sign of a potentially insecure script or one that has not been maintained or updated recently.</li>
<li><strong>Controlling File Access</strong>: One option you can use in php.ini is open_basedir. This option takes a sub-directory as its value such as /home/user/html/. It restricts PHP’s I/O to that sub-directory which prevents PHP from reading or writing files outside of that sub-directory.Safe_mode in php.ini can be used to control access to files. PHP is only able to open files that are owned by the same user as your web server. It also prevents PHP from executing binaries. If you need to allow PHP to access files that are owned by different owners you can use safe_mode_gid. This limits PHP&#8217;s access to only files that are owned by the group that your web server runs under.</li>
<li><strong>Hiding PHP</strong>: Security by obscurity is not sufficient to protect your application, it does make it harder for potential hackers to exploit your site if they do not know what technologies are behind it. PHP exposes itself in a number of ways including inside the Apache headers and in the Apache footer signature. You can turn off this behavior with expose_php = off in php.ini.</li>
<li><strong>Hiding display of errors</strong>: PHP exposes its presence is through the display of errors. These errors often include path information and other settings that a hacker will find invaluable. These error messages are invaluable during development for testing and debugging but they should be turned off on production sites. You can turn them off by setting: display_errors = Off in php.ini. A useful feature is to have the error messages logged to a log file instead which you can do by setting: log_errors = On in php.ini.</li>
<li><strong>URL Rewriting</strong>: We can configure Apache to rewrite your URLs so as to hide the .php ending.</li>
</ul>
<p><strong><br />
</strong></p>
<p><strong>Disclaimer</strong>:</p>
<p>These tips can be informed and extremely useful but they should not take the place of professional advice. Security Tips should be used entirely at your own risk. If you wish to rely on or apply any of the information of this site you do so at your own risk and take full responsibility for your own actions.</p>
]]></content:encoded>
			<wfw:commentRss>http://technology.freenetsolutions.com/security-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP header and Server Response Codes</title>
		<link>http://technology.freenetsolutions.com/http-header-and-server-response-codes/</link>
		<comments>http://technology.freenetsolutions.com/http-header-and-server-response-codes/#comments</comments>
		<pubDate>Mon, 19 May 2008 14:27:13 +0000</pubDate>
		<dc:creator>infoweb</dc:creator>
				<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Codes]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Header Check]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Server Header]]></category>
		<category><![CDATA[Server Response]]></category>

		<guid isPermaLink="false">http://technology.freenetsolutions.com/?p=5</guid>
		<description><![CDATA[Introduction HTTP is a transfer protocol used by the World Wide Web (WWW) to retrieve information from distributed servers. The HTTP model is extremely simple; the client establishes a connection to the remote server, then issues a request. The server then processes the request, returns a response, and closes the connection. Most HTTP communication is [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><strong>Introduction</strong></p>
<p>HTTP is a transfer protocol used by the World Wide Web (WWW) to retrieve information from distributed servers. The HTTP model is extremely simple; the client establishes a connection to the remote server, then issues a request. The server then processes the request, returns a response, and closes the connection. Most HTTP communication is initiated by a user agent and consists of a request to be applied to a resource on some origin server. HTTP communication usually takes place over TCP/IP connections. The default port is TCP 80, but other ports can be used like 21 (FTP), 443 (HTTPS).<span id="more-5"></span></p>
<p><strong>Requests</strong>:  The request format for HTTP is quite simple. The first line specifies an object, together with the name of an object to apply the method to. The most commonly used method is &#8220;GET&#8221;, which ask the server to send a copy of the object to the client. The client can also send a series of optional headers. The most common headers are &#8220;Accept&#8221;, which tells the server which object types the client can handle, and &#8220;User-Agent&#8221;, which gives the implementation name of the client.</p>
<p><strong>Responses</strong>: The response format is also quite simple. Responses start with a status line indicating which version of HTTP the server is running, together with a result code and an optional message. This is followed by a series of optional object headers; the most important of these are &#8220;Content-Type&#8221;, which describes the type of the object being returned, and &#8220;Content-Length&#8221;, which indicates the length.The headers are teminated by an empty line.  The server now sends any requested data. After the data have been sent, the server drops the connection.</p>
<p><strong>Headers</strong>: Headers are short fragments of text which are generated by servers to hold information pertaining to each transfer as it occurs. There are four kinds of headers:</p>
<ol type="a">
<li><em>General-Header</em>: These are few header fields which have general applicability for both request and response messages.  These header fields apply only to the message being transmitted which include Cache-Control, Connection, Date, Pragma, Transfer-Encoding etc.</li>
<li><em>Request-Header</em>: The request-header fields allow the client to pass additional information about the request, and about the client itself, to the server.  These fields acts as request modifiers, with semantics equivalent to the parameters on a programming language method invocation.  The request-headers are:  Accept-Charset, Authorization, Accept-Encoding, From, Host, If-Match.</li>
<li><em>Response-Header</em>: The response-header fields allow the server to pass additional information about the response which cannot be placed in the Status-Line.  These header fields give information about the server and about futher access to the resource identified by the Request-URI. The response-header are: Age, ETag, Location, Retry-After, Server, Vary, WWW-Authenticate etc.</li>
<li><em>Entity-Header</em>: Request and Response message MAY transfer an entity if not otherwise restricted by the request method or response status code.  Entity-Header fields define meta information about the entity-body or, if no body is present, about the resource identified by the request. Some of this meta information is OPTIONAL, some might be REQUIRED.  The entity-header includes: Content-Encoding, Content-Language, Content-Type, Expires, Last-Modified etc.</li>
</ol>
<p><strong>Status Code and Reason Phrase</strong></p>
<p>The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request. The Reason-Phrase is intended to give a short textual description of the Status-Code. The Status-Code is intended for use by automata and the Reason-Phrase is intended for the human user. The client is not required to examine or display the Reason- Phrase.</p>
<p>The first digit of the Status-Code defines the class of response. The last two digits do not have any categorization role. There are 5 values for the first digit:</p>
<ul>
<li>1xx: Informational &#8211; Request received, continuing process.</li>
<li>2xx: Success &#8211; The action was successfully received, understood, and accepted</li>
<li>3xx: Redirection &#8211; Further action must be taken in order to complete the request</li>
<li>4xx: Client Error &#8211; The request contains bad syntax or cannot be fulfilled</li>
<li>5xx: Server Error &#8211; The server failed to fulfill an apparently valid request</li>
</ul>
<p> </p>
<table border="0" width="100%">
<tbody>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"><strong>Informational</strong></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#f5f5f5">100-199</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Silent Response Codes that signify that a request has been received and is currently being processed.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">100</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Continue</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A status code of 100 indicates that (usually the first) part of a request has been received without any problems, and that the rest of the request should now be sent.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">101</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Switching Protocols</td>
<td align="left" valign="top" bgcolor="#f5f5f5">HTTP 1.1 is just one type of protocol for transferring data on the web, and a status code of 101 indicates that the server is changing to the protocol it defines in the &#8220;Upgrade&#8221; header it returns to the client. For example, when requesting a page, a browser might receive a statis code of 101, followed by an &#8220;Upgrade&#8221; header showing that the server is changing to a different version of HTTP.</td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"> </td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"><strong>Successful Client Requests</strong></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#f5f5f5">200-299</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Silent codes that confirm that requests have completed successfully.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">200</td>
<td align="left" valign="top" bgcolor="#f5f5f5">OK</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 200 status code is by far the most common returned. It means, simply, that the request was received and understood and is being processed.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">201</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Created</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 201 status code indicates that a request was successful and as a result, a resource has been created (for example a new page).</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">202</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Accepted</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The status code 202 indicates that server has received and understood the request, and that it has been accepted for processing, although it may not be processed immediately.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">203</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Non-Authoritative Information</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 203 status code means that the request was received and understood, and that information sent back about the response is from a third party, rather than the original server. This is virtually identical in meaning to a 200 status code.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">204</td>
<td align="left" valign="top" bgcolor="#f5f5f5">No Content</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 204 status code means that the request was received and understood, but that there is no need to send any data back.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">205</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Reset Content</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 205 status code is a request from the server to the client to reset the document from which the original request was sent. For example, if a user fills out a form, and submits it, a status code of 205 means the server is asking the browser to clear the form.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">206</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Partial Content</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A status code of 206 is a response to a request for part of a document. This is used by advanced caching tools, when a user agent requests only a small part of a page, and just that section is returned.</td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"> </td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"><strong>Client Request Redirected</strong></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#f5f5f5">300-399</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A redirection is occurring from the original request.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">300</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Multiple Choices</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 300 status code indicates that a resource has moved. The response will also include a list of locations from which the user agent can select the most appropriate.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">301</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Moved Permanently</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A status code of 301 tells a client that the resource they asked for has permanently moved to a new location. The response should also include this location. It tells the client to use the new URL the next time it wants to fetch the same resource.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">302</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Found</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A status code of 302 tells a client that the resource they asked for has temporarily moved to a new location. The response should also include this location. It tells the client that it should carry on using the same URL to access this resource.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">303</td>
<td align="left" valign="top" bgcolor="#f5f5f5">See Other</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 303 status code indicates that the response to the request can be found at the specified URL, and should be retrieved from there. It does not mean that something has moved &#8211; it is simply specifying the address at which the response to the request can be found.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">304</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Not Modified</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 304 status code is sent in response to a request (for a document) that asked for the document only if it was newer than the one the client already had. Normally, when a document is cached, the date it was cached is stored. The next time the document is viewed, the client asks the server if the document has changed. If not, the client just reloads the document from the cache.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">305</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Use Proxy</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 305 status code tells the client that the requested resource has to be reached through a proxy, which will be specified in the response.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">307</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Temporary Redirect</td>
<td align="left" valign="top" bgcolor="#f5f5f5">307 is the status code that is sent when a document is temporarily available at a different URL, which is also returned. There is very little difference between a 302 status code and a 307 status code. 307 was created as another, less ambiguous, version of the 302 status code.</td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"> </td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"><strong>Client Request Errors</strong></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#f5f5f5">400-499</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Request is incomplete for some reason.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">400</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Bad Request</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A status code of 400 indicates that the server did not understand the request due to bad syntax.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">401</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Unauthorised</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 401 status code indicates that before a resource can be accessed, the client must be authorised by the server.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">402</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Payment Required</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 402 status code is not currently in use, being listed as &#8220;reserved for future use&#8221;.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">403</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Forbidden</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 403 status code indicates that the client cannot access the requested resource. That might mean that the wrong username and password were sent in the request, or that the permissions on the server do not allow what was being asked.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">404</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Not Found</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The best known of them all, the 404 status code indicates that the requested resource was not found at the URL given, and the server has no idea how long for.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">405</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Method Not Allowed</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 405 status code is returned when the client has tried to use a request method that the server does not allow. Request methods that are allowed should be sent with the response (common request methods are POST and GET).</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">406</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Not Acceptable</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 406 status code means that, although the server understood and processed the request, the response is of a form the client cannot understand. A client sends, as part of a request, headers indicating what types of data it can use, and a 406 error is returned when the response is of a type not in that list.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">407</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Proxy Authentication Required</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 407 status code is very similar to the 401 status code, and means that the client must be authorised by the proxy before the request can proceed.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">408</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Request Timeout</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 408 status code means that the client did not produce a request quickly enough. A server is set to only wait a certain amount of time for responses from clients, and a 408 status code indicates that time has passed.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">409</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Conflict</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 409 status code indicates that the server was unable to complete the request, often because a file would need to be editted, created or deleted, and that file cannot be editted, created or deleted.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">410</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Gone</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 410 status code is the 404&#8242;s lesser known cousin. It indicates that a resource has permanently gone (a 404 status code gives no indication if a resource has gine permanently or temporarily), and no new address is known for it.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">411</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Length Required</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 411 status code occurs when a server refuses to process a request because a content length was not specified.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">412</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Precondition Failed</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 412 status code indicates that one of the conditions the request was made under has failed.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">413</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Request Entity Too Large</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 413 status code indicates that the request was larger than the server is able to handle, either due to physical constraints or to settings. Usually, this occurs when a file is sent using the POST method from a form, and the file is larger than the maximum size allowed in the server settings.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">414</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Request-URI Too Long</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 414 status code indicates the the URL requested by the client was longer than it can process.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">415</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Unsupported Media Type</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 415 status code is returned by a server to indicate that part of the request was in an unsupported format.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">416</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Requested Range Not Satisfiable</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 416 status code indicates that the server was unable to fulfill the request. This may be, for example, because the client asked for the 800th-900th bytes of a document, but the document was only 200 bytes long.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">417</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Expectation Failed</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 417 status code means that the server was unable to properly complete the request. One of the headers sent to the server, the &#8220;Expect&#8221; header, indicated an expectation the server could not meet.</td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"> </td>
</tr>
<tr>
<td colspan="3" align="left" valign="top" bgcolor="#f5f5f5"><strong>Server Errors</strong></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#f5f5f5">500-599</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Errors have occurred in the server itself.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">500</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Internal Server Error</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 500 status code (all too often seen by Perl programmers) indicates that the server encountered something it didn&#8217;t expect and was unable to complete the request.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">501</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Not Implemented</td>
<td align="left" valign="top" bgcolor="#f5f5f5">The 501 status code indicates that the server does not support all that is needed for the request to be completed.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">502</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Bad Gateway</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 502 status code indicates that a server, while acting as a proxy, received a response from a server further upstream that it judged invalid.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">503</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Service Unavailable</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 503 status code is most often seen on extremely busy servers, and it indicates that the server was unable to complete the request due to a server overload.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">504</td>
<td align="left" valign="top" bgcolor="#f5f5f5">Gateway Timeout</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 504 status code is returned when a server acting as a proxy has waited too long for a response from a server further upstream.</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#f5f5f5">505</td>
<td align="left" valign="top" bgcolor="#f5f5f5">HTTP Version Not Supported</td>
<td align="left" valign="top" bgcolor="#f5f5f5">A 505 status code is returned when the HTTP version indicated in the request is no supported. The response should indicate which HTTP versions are supported.</td>
</tr>
</tbody>
</table>
<p> To check the headers visit: <a title="HTTP HTTPS Header Check" href="http://tools.freenetsolutions.com/web_server_header.php" target="_blank"><strong>HTTP / HTTPS Header Check</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://technology.freenetsolutions.com/http-header-and-server-response-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shorthand CSS Properties</title>
		<link>http://technology.freenetsolutions.com/shorthand-css-properties/</link>
		<comments>http://technology.freenetsolutions.com/shorthand-css-properties/#comments</comments>
		<pubDate>Tue, 08 May 2007 07:49:21 +0000</pubDate>
		<dc:creator>infoweb</dc:creator>
				<category><![CDATA[Website Formatting]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Optimization]]></category>
		<category><![CDATA[CSS Properties]]></category>

		<guid isPermaLink="false">http://technology.freenetsolutions.com/?p=4</guid>
		<description><![CDATA[The CSS can be made clean with removing the properties names as mentioned below.  This can help in reducing the size of CSS in the process of development of website. Font Use: font: 1em/1.5em bold italic serif …instead of font-size: 1em; line-height: 1.5em; font-weight: bold; font-style: italic; font-family: serif   Border Use: border: 1px black [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>The CSS can be made clean with removing the properties names as mentioned below.  This can help in reducing the size of CSS in the process of development of website.</p>
<h2>Font</h2>
<p>Use:</p>
<blockquote><p>font: 1em/1.5em bold italic serif<br />
…instead of<br />
font-size: 1em; <span>line-height: 1.5em;</span> <span>font-weight: bold;</span> <span>font-style: italic;</span> <span>font-family: serif</span></p></blockquote>
<p> <span id="more-4"></span></p>
<h2>Border</h2>
<p>Use:</p>
<blockquote><p>border: 1px black solid<br />
…instead of<br />
<span>border-width: 1px;</span> <span>border-color: black;</span> <span>border-style: solid</span></p></blockquote>
<h2>Background</h2>
<p>Use:</p>
<blockquote>
<p class="coding">background: #fff url(image.gif) no-repeat top left<br />
…instead of<br />
<span>background-color: #fff;</span> <span>background-image: url(image.gif);</span> <span>background-repeat: no-repeat;</span> <span>background-position: top left;</span></p>
</blockquote>
<h2>Margin, padding, border</h2>
<p>Use:</p>
<blockquote>
<p class="coding">margin: 2px 1px 3px 4px <strong>(top, right, bottom, left)<br />
</strong>…instead of<br />
<span>margin-top: 2px;</span> <span>margin-right: 1px;</span> <span>margin-bottom: 3px;</span> <span>margin-right: 4px</span></p>
</blockquote>
<p>Use:</p>
<blockquote>
<p class="coding">margin: 5em 1em 3em <strong>(top, left and right, bottom)<br />
</strong>…instead of<br />
<span>margin-top: 5em;</span> <span>margin-bottom: 1em;</span> <span>margin-right: 1em;</span> <span>margin-right: 4em</span></p>
</blockquote>
<p>Use:</p>
<blockquote>
<p class="coding">margin: 5% 1% <strong>(top and bottom, left and right)<br />
</strong>…instead of<br />
<span>margin-top: 5%;</span> <span>margin-bottom: 5%;</span> <span>margin-right: 1%;</span> <span>margin-right: 1%</span></p>
</blockquote>
<p>These rules can be applied to <span class="code">margin</span>, <span class="code">border</span> and <span class="code">padding</span>.</p>
]]></content:encoded>
			<wfw:commentRss>http://technology.freenetsolutions.com/shorthand-css-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Code Optimization</title>
		<link>http://technology.freenetsolutions.com/php-code-optimization/</link>
		<comments>http://technology.freenetsolutions.com/php-code-optimization/#comments</comments>
		<pubDate>Sat, 05 May 2007 06:11:41 +0000</pubDate>
		<dc:creator>infoweb</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Php code]]></category>
		<category><![CDATA[PHP Optimization]]></category>
		<category><![CDATA[PHP Performance]]></category>

		<guid isPermaLink="false">http://technology.freenetsolutions.com/?p=3</guid>
		<description><![CDATA[I have found the post by Reinhold Webber, which provide good techniques and methods for PHP performance and optimization.   I have tried to add more explanation to the points posted by Reinhold Webber. If a method can be static, declare it static. Speed improvement is by a factor of 4. echo is faster than print and [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I have found the post by <a rel="external,nofollow" href="http://reinholdweber.com/?p=3" target="_blank">Reinhold Webber</a>, which provide good techniques and methods for PHP performance and optimization.   I have tried to add more explanation to the points posted by Reinhold Webber.</p>
<ol>
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li>
<li>echo is faster than print and print_r.</li>
<li>Use echo&#8217;s multiple parameters instead of string concatenation.</li>
<li>Set the maxvalue for your for-loops before and not in the loop.</li>
<li>Unset your variables to free memory, especially large arrays.</li>
<li>Avoid magic like __get, __set, __autoload.<span id="more-3"></span></li>
<li>require_once()/include_once are expensive., use require/include instead.</li>
<li>Use full paths in includes and requires, less time spent on resolving the OS paths. Always use full path file path when opening files, to avoid expensive normalization of the file&#8217;s path. This is also important even if you use opcode cache, since the paths of includes and normal files will still need to be resolved.</li>
<li>If you need to find out the time when the script started executing, INSERT:CONTENT:END SERVER['REQUEST_TIME'] is preferred to time()</li>
<li>See if you can use strncasecmp, strpbrk and stripos instead of regex</li>
<li>str_replace is faster than preg_replace, but strtr is faster than str_replace by a factor of 4</li>
<li>If the function, such as string replacement function, accepts both arrays and single characters as arguments, and if your argument list is not too long, consider writing a few redundant replacement statements, passing one character at a time, instead of one line of code that accepts arrays as search and replace arguments.</li>
<li>It&#8217;s better to use select statements than multi if, else if, statements.</li>
<li>Error suppression with @ is very slow.</li>
<li>Turn on apache&#8217;s mod_deflate.</li>
<li>Close your database connections when you&#8217;re done with them.</li>
<li>$row['id'] is 7 times faster than $row[id]</li>
<li>Error messages are expensive.  Do use error_reporting (E_ALL) during debug.</li>
<li>Do not use functions inside of for loop, such as for ($x=0; $x &lt; count($array); $x) The count() function gets called each time.</li>
<li>Incrementing a local variable in a method is the fastest. Nearly the same as calling a local variable in a function.</li>
<li>Incrementing a global variable is 2 times slow than a local var.</li>
<li>Incrementing an object property (eg. <samp>$this-&gt;prop++</samp>) is 3 times slower than a local variable.</li>
<li>Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.</li>
<li>Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.</li>
<li>Method invocation appears to be independent of the number of methods defined in the class because I added 10 more methods to the test class (before and after the test method) with no change in performance.</li>
<li>Methods in derived classes run faster than ones defined in the base class.</li>
<li>A function call with one parameter and an empty function body takes about the same time as doing 7-8 <samp>$localvar++</samp> operations. A similar method call is of course about 15 <samp>$localvar++</samp> operations.</li>
<li>Surrounding your string by &#8216; instead of &#8221; will make things interpret a little faster since php looks for variables inside &#8220;&#8230;&#8221; but not inside &#8216;&#8230;&#8217;. Of course you can only do this when you don&#8217;t need to have variables in the string.</li>
<li>When echoing strings it&#8217;s faster to separate them by comma instead of dot. Note: This only works with echo, which is a function that can take several strings as arguments.</li>
<li>A PHP script will be served at least 2-10 times slower than a static HTML page by Apache. Try to use more static HTML pages and fewer scripts.</li>
<li>Your PHP scripts are recompiled every time unless the scripts are cached. Install a PHP caching product to typically increase performance by 25-100% by removing compile times.<br />
You can try these products:<br />
- <em>ionCube PHP Accelerator</em>: This has the most recognizable &#8220;brand&#8221;, and some hosting providers even offer it, but it&#8217;s offered only in binary form and the license seems internationally ambiguous (not free).<br />
-<em>Turck MMCache for PHP</em>: Has a good performance, and is GPL&#8217;d, but development appears to have ended way back in 2003.<br />
-<em>afterBURNDER * Cache</em>: A tool to speed up web applications.  This project is also dead now.<br />
- <em>Zend Platform Performance Suite</em>: A commercial suite that enchanced multi-layered caching, monitoring of PHP, Java, Apache &amp; HTTP etc.<br />
- <em>APC: Alternative PHP Cache</em>: APC is a free, open, and robust framework for caching and optimizing PHP intermediate code.</li>
<li>Cache as much as possible. Use memcached &#8211; memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load. OP code caches are useful so that your script does not have to be compiled on every request</li>
<li>When working with strings and you need to check that the string is either of a certain length you&#8217;d understandably would want to use the strlen() function. This function is pretty quick since it&#8217;s operation does not perform any calculation but merely return the already known length of a string available in the zval structure (internal C struct used to store variables in PHP). However because strlen() is a function it is still somewhat slow because the function call requires several operations such as lowercase &amp; hashtable lookup followed by the execution of said function. In some instance you can improve the speed of your code by using an isset() trick.<br />
Example:</li>
<blockquote><p><code>if (strlen($foo) &lt; 5) { echo "Foo is too short"; }<br />
vs.<br />
if (!isset($foo{5})) { echo "Foo is too short"; }</code></p></blockquote>
<p>Calling isset() happens to be faster then strlen() because unlike strlen(), isset() is a language construct and not a function meaning that it&#8217;s execution does not require function lookups and lowercase. This means you have virtually no overhead on top of the actual code that determines the string&#8217;s length.</p>
<li>When incrementing or decrementing the value of the variable <samp>$i++</samp> happens to be a tad slower then <samp>++$i</samp>. This is something PHP specific and does not apply to other languages, so don&#8217;t go modifying your C or Java code thinking it&#8217;ll suddenly become faster, it won&#8217;t. <samp>++$i</samp> happens to be faster in PHP because instead of 4 opcodes used for <samp>$i++</samp> you only need 3. Post incrementation actually causes in the creation of a temporary var that is then incremented. While pre-incrementation increases the original value directly. This is one of the optimization that opcode optimized like Zend&#8217;s PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.</li>
<li>Not everything has to be OOP, often it is too much overhead, each method and object call consumes a lot of memory.</li>
<li>Do not implement every data structure as a class, arrays are useful, too</li>
<li>Don&#8217;t split methods too much, think, which code you will really re-use</li>
<li>You can always split the code of a method later, when needed</li>
<li>Make use of the countless predefined functions</li>
<li>If you have very time consuming functions in your code, consider writing them as C extensions</li>
<li>Profile your code. A profiler shows you, which parts of your code consumes how many time. The Xdebug debugger already contains a profiler. Profiling shows you the bottlenecks in overview</li>
<li>mod_gzip which is available as an Apache module compresses your data on the fly and can reduce the data to transfer up to 80%</li>
<li><a class="nw" href="http://phplens.com/lens/php-book/optimizing-debugging-php.php" target="_blank">Excellent Article</a> about optimizing php by John Lim</li>
</ol>
<p>In the above in would like to include few of my experience and few of point which i have learnt from internet. </p>
<ul>
<li>PHP configuration directives make significant impact on performance of PHP.<br />
- Make sure that <em>register_globals</em> is disabled.<br />
- Disable <em>magic_quotes_*</em> directives.<br />
- Turn of <em>expose_php</em>.<br />
- Turn off <em>register_argc_argv</em> for non-cli SAPIs.<br />
- Unless absolutely necessary do not enable <em>always_populate_raw_post_data</em>.</li>
<li>PHP supports zlib compression for cached pages.</li>
<li>Session Optimization<br />
- Don&#8217;t used <em>session.auto_start</em>.<br />
- Do not enable <em>session.use_trans_sid</em>.<br />
- Whenever possible set <em>session.cache_limiter</em> to <em>private_no_expire</em>.<br />
- Assign each vhost it&#8217;s own sessions directory.<br />
- If possible avoid automatic garbage collection.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://technology.freenetsolutions.com/php-code-optimization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)
Database Caching using disk
Object Caching 505/673 objects using disk

Served from: technology.freenetsolutions.com @ 2012-05-19 12:16:10 -->
