<?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>Encodez Blog &#187; XHTML</title>
	<atom:link href="http://encodez.com/blog/category/webdevelopement/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://encodez.com/blog</link>
	<description>Computer language design is just like a stroll in the park. Jurassic Park, that is. — Larry Wall</description>
	<lastBuildDate>Thu, 22 Jul 2010 05:34:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Solution : Disabling image caching in browser (IE, Firefox, Chrome)</title>
		<link>http://encodez.com/blog/2009/11/solution-disabling-image-caching-in-browser-ie-firefox-chrome/</link>
		<comments>http://encodez.com/blog/2009/11/solution-disabling-image-caching-in-browser-ie-firefox-chrome/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 07:01:13 +0000</pubDate>
		<dc:creator>Muneer Shaheed</dc:creator>
				<category><![CDATA[Webdevelopement]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[image cache]]></category>

		<guid isPermaLink="false">http://encodez.com/blog/?p=288</guid>
		<description><![CDATA[There is a big headache among web developers with image caching. If you are using the same name while updating the image in the server, browser will not update it as quickly as you updated. This might occur in most cases where you update the image but not the file name. Confused? Let’s Make it clear,,]]></description>
			<content:encoded><![CDATA[<p>There is a big headache among web developers with image caching. If you are using the same name while updating the image in the server, browser will not update it as quickly as you updated. This might occur in most cases where you update the image but not the file name. Confused? Let’s Make it clear,,</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ad_slot = "8998015769";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>For example you have an image named “datasheet.jpg”. You are displaying this image on the webpage.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;datasheet.jpg&quot; /&gt;</pre></div></div>

<p>Let’s say, if you are updating this image and leave it with the same name “datasheet.jpg”. Then also you image tag will be same.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;datasheet.jpg&quot; /&gt;</pre></div></div>

<p> In many cases, browser will not know there is a new version of the same image and it will tend to display the content from the web cache. Even no-cache headers are not helping in these type of occasion (I tried and tired). So the returning visitor will see the same old image. </p>
<p>The simplest solution is to change the image filename. But how you will create a different name for an image that is in same name. Ok. Do it simply.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;datasheet.jpg?mtime=1257316941&quot; /&gt;</pre></div></div>

<p>Do this -> Append a  <strong>Query Sting</strong></p>
<p>When you attach query sting in end of image file name, browser will treat it as a different file name and looks for the web server for new. This will not make the browser to display the cached content.</p>
<p><strong>How to generate an optimized version of Query String for Image file name?</strong></p>
<p>Using simply random value as query string will lead the browser to load the new version of image regardless of updated version. This will make the loading time of the web page too long even if the correct version of image is there on cache. This will become overhead. To overcome this issue, we can generate the query string using file modified time. So the query string will not be changed until file is modified next time. Once the file is modified, the query string will be changed and browser will load the new version.</p>
<p><strong>Generate filename with query string using file modified time (PHP)</strong></p>
<p>Use the <code>filemtime($path)</code> function to generate file modified time.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;img src=&quot;datasheet.jpg?mtime='</span> <span style="color: #339933;">.</span> <span style="color: #990000;">filemtime</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;datasheet.jpg)  . '&quot;</span> <span style="color: #339933;">/&gt;</span><span style="color: #0000ff;">';</span></pre></div></div>

<p>this will generate something similar to this</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;datasheet.jpg?mtime=1257316941&quot; /&gt;</pre></div></div>

<p><strong>This will work for all types of browser including IE, FF, GC and all others.</strong><br />
I hope this will be useful for you. Don’t forget to leave a comment if you find any mistake on me. </p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ui_features = "rc:6";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_alternate_ad_url = "?adsensem-benice=468x60";
google_color_border = "#ffffff";
google_color_bg = "#ffffff";
google_color_link = "#333333";
google_color_text = "#666666";
google_color_url = "008000";

//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://encodez.com/blog/2009/11/solution-disabling-image-caching-in-browser-ie-firefox-chrome/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript Multitransition Banner released</title>
		<link>http://encodez.com/blog/2009/06/javascript-multitransition-banner/</link>
		<comments>http://encodez.com/blog/2009/06/javascript-multitransition-banner/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 09:39:03 +0000</pubDate>
		<dc:creator>Muneer Shaheed</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Webdevelopement]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[banner]]></category>
		<category><![CDATA[download]]></category>

		<guid isPermaLink="false">http://www.encodez.com/blog/?p=164</guid>
		<description><![CDATA[It is pleasure for me to share the codes that I have written for a banner. This is completely using Javascript/<a title="jQuery" href="http://jquery.com/" target="_blank">jQuery</a> and CSS. Easy to customize and easy to install. Actually I was adopting the design from <a href="http://www.cisco.com/" target="_blank">CISCO</a> and <a href="http://www.ibm.com/us/en/" target="_blank">IBM</a> websites. I am not much good in Adobe Flash animation. It is the main reason to build this in Javascript. LOL.]]></description>
			<content:encoded><![CDATA[<p>It is pleasure for me to share the codes that I have written for a banner. This is completely using Javascript/<a title="jQuery" href="http://jquery.com/" target="_blank">jQuery</a> and CSS. Easy to customize and easy to install. Actually I was adopting the design from <a href="http://www.cisco.com/" target="_blank">CISCO</a> and <a href="http://www.ibm.com/us/en/" target="_blank">IBM</a> websites. I am not much good in Adobe Flash animation. It is the main reason to build this in Javascript. LOL.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ad_slot = "8998015769";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
.</p>
<p><strong>Highlits:</strong></p>
<ul>
<li>100% pure Javascript/jQuery</li>
<li>Fast Loading</li>
<li>Auto animate banner</li>
<li>Easy to use link buttons</li>
<li>Enable or disable any texts</li>
<li>Easy to integrate with PHP, ASP.NET and any other servers</li>
</ul>
<p><strong>Demo</strong></p>
<p>Click <a title="Demonstration" href="http://encodez.com/demos/multi-transition-banner/" target="_blank"><strong>here </strong></a>to see a demo</p>
<p><strong>Download</strong></p>
<p><a href="http://www.encodez.com/downloads/free-multi-transition_banner.zip"><img class="alignleft size-full wp-image-175" title="1245317616_download" src="http://www.encodez.com/blog/wp-content/uploads/2009/06/1245317616_download.png" alt="" width="16" height="16" /></a> <a href="http://www.encodez.com/downloads/free-multi-transition_banner.zip">Link 1</a></p>
<p><strong>Screenshot :</strong></p>
<div id="attachment_169" class="wp-caption alignnone" style="width: 415px"><a href="http://encodez.com/demos/multi-transition-banner/"><img class="size-full wp-image-169" title="multi-transition-banner-free-1" src="http://www.encodez.com/blog/wp-content/uploads/2009/06/multi-transition-banner-free-1.jpg" alt="Screenshot 1" width="405" height="331" /></a><p class="wp-caption-text">Screenshot 1</p></div>
<p>.</p>
<div id="attachment_171" class="wp-caption alignnone" style="width: 414px"><a href="http://encodez.com/demos/multi-transition-banner/"><img class="size-full wp-image-171" title="multi-transition-banner-free-21" src="http://www.encodez.com/blog/wp-content/uploads/2009/06/multi-transition-banner-free-21.jpg" alt="Screenshot 2" width="404" height="393" /></a><p class="wp-caption-text">Screenshot 2</p></div>
<p>.</p>
<div id="attachment_172" class="wp-caption alignnone" style="width: 410px"><a href="http://encodez.com/demos/multi-transition-banner/"><img class="size-full wp-image-172" title="multi-transition-banner-free-3" src="http://www.encodez.com/blog/wp-content/uploads/2009/06/multi-transition-banner-free-3.jpg" alt="Screenshot 3" width="400" height="163" /></a><p class="wp-caption-text">Screenshot 3</p></div>
<p><strong>Installation:</strong></p>
<p>Installation instruction found in source file.</p>
<h3><span style="color: #008000;">This is not 100% complete. Please give me your feedbacks. I will make any changes for the improvement.</span></h3>
<ul>
<li><strong>Use it for free &amp; Please give me a link back if you like.</strong></li>
</ul>
<h3><span style="color: #ff0000;">Bugs &amp; Fixes</span></h3>
<ul>
<li><a title="Dropdown Menu Issue" href="http://www.encodez.com/blog/index.php/2009/06/javascript-multitransition-banner/#comment-2247" target="_self">Dropdown Menu problem</a></li>
<li><a title="Dropdown Menu Issue" href="http://encodez.com/blog/2010/02/adding-link-to-banner-image-multi-transition-banner/" target="_self">Adding link to Large image in Banner</a></li>
</ul>
<p>.</p>
]]></content:encoded>
			<wfw:commentRss>http://encodez.com/blog/2009/06/javascript-multitransition-banner/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
		<item>
		<title>How to make a DIV layer centered!</title>
		<link>http://encodez.com/blog/2009/05/how-to-make-a-div-layer-centered/</link>
		<comments>http://encodez.com/blog/2009/05/how-to-make-a-div-layer-centered/#comments</comments>
		<pubDate>Tue, 26 May 2009 21:06:37 +0000</pubDate>
		<dc:creator>Muneer Shaheed</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Webdevelopement]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.encodez.com/blog/?p=137</guid>
		<description><![CDATA[It is a challenge among many CSS designers to get the CSS page works same as they expected in all and every browsers. Different browsers render some of the CSS tags in different ways and some are omitted completely. No one will forget the IE 6 as a big headache and a bug full browser [...]]]></description>
			<content:encoded><![CDATA[<p>It is a challenge among many CSS designers to get the CSS page works same as they expected in all and every browsers. Different browsers render some of the CSS tags in different ways and some are omitted completely. No one will forget the IE 6 as a big headache and a bug full browser ever. It&#8217;s behavior torches  all CSS designers. Thanks Microsoft they upgraded themselves with IE7.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ad_slot = "8998015769";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Centering a layer is not that much harder part. It is simple but it is the start of most web page. So it is worth knowing the right syntex that works with almost all browsers today. Following is a sample style that works in all browsers.</p>
<p><strong>CSS Style</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">&nbsp;
body <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#outerWrapper</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">900px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #cc00cc;">#999</span> <span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p><strong>The Body</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;outerWrapper&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>Cool ! It is working fine. By the way, I have a<strong> absolute positioned layer</strong>. Will this work with this idea. <img src='http://encodez.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  No problem buddy. There is nother technique using the negative margin.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#outerWrapper</span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">50</span>%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">900px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-450px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Check wheather is this work for you. Probably it should.</p>
]]></content:encoded>
			<wfw:commentRss>http://encodez.com/blog/2009/05/how-to-make-a-div-layer-centered/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
