<?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>Webdesgin</title>
	<atom:link href="http://webdesign.onyou.ch/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesign.onyou.ch</link>
	<description>all about web and design</description>
	<lastBuildDate>Thu, 10 Nov 2011 16:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress get user id by login name</title>
		<link>http://webdesign.onyou.ch/2011/11/10/wordpress-get-user-id-by-login-name/</link>
		<comments>http://webdesign.onyou.ch/2011/11/10/wordpress-get-user-id-by-login-name/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 16:41:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[get_userdatabylogin]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=796</guid>
		<description><![CDATA[If you have ever wondered how to get the user id from user login name in wordpress, here is the answer. By using get_userdatabylogin $user = get_userdatabylogin&#40;'loginname'&#41;; if&#40;$user&#41;&#123; echo $user-&#62;ID; &#125;]]></description>
			<content:encoded><![CDATA[<p>If you have ever wondered how to get the user id from user login name in wordpress, here is the answer.</p>
<p>By using get_userdatabylogin</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="php" style="font-family:monospace;"><span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> get_userdatabylogin<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'loginname'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre>
</td>
</tr>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2011/11/10/wordpress-get-user-id-by-login-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic WordPress URL</title>
		<link>http://webdesign.onyou.ch/2011/07/31/dynamic-wordpress-url/</link>
		<comments>http://webdesign.onyou.ch/2011/07/31/dynamic-wordpress-url/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 18:49:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=794</guid>
		<description><![CDATA[If you have more than one domains (addon domains) for the same wordpress site you can add the following to your wp-config.php to override the default WP_HOME and WP_SITEURL definitions with dynamic host address. Adding these two definitions also reduces the number of database queries and thus improves site performance. Here is an example (note [...]]]></description>
			<content:encoded><![CDATA[<p>If you have more than one domains (addon domains) for the same wordpress site you can add the following to your wp-config.php to override the default WP_HOME and WP_SITEURL definitions with dynamic host address. Adding these two definitions also reduces the number of database queries and thus improves site performance. Here is an example (note that you should not include a trailing slash at the end of either URL):</p>
<p>This is for static use (just one domain):</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_HOME'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://onyou.ch'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_SITEURL'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://onyou.ch'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>For more than one domain set these values dynamically:</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_HOME'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://'</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_HOST'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_SITEURL'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://'</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_HOST'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2011/07/31/dynamic-wordpress-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the site url in WordPress</title>
		<link>http://webdesign.onyou.ch/2011/06/01/changing-the-site-url-in-wordpress/</link>
		<comments>http://webdesign.onyou.ch/2011/06/01/changing-the-site-url-in-wordpress/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 15:40:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[rewrite_rules]]></category>
		<category><![CDATA[siteurl]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=793</guid>
		<description><![CDATA[If you move your wordpress installation to a new location (a new domain or another folder), you need to change all urls within your wp database. You might find some plugins to do this task but in my opinion the easiest way to do this is by using phpMyAdmin. Just run the following SQL Statements [...]]]></description>
			<content:encoded><![CDATA[<p>If you move your wordpress installation to a new location (a new domain or another folder), you need to change all urls within your wp database. You might find some plugins to do this task but in my opinion the easiest way to do this is by using phpMyAdmin. Just run the following SQL Statements with your old a new location:</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="text" style="font-family:monospace;">UPDATE wp_posts SET guid = REPLACE (guid,'www.oldsite.com','www.newsite.com');
UPDATE wp_posts SET post_content = REPLACE (post_content, 'www.oldsite.com', 'www.newsite.com');
UPDATE wp_options SET option_value = replace(option_value,  'www.oldsite.com', 'www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';</pre>
</td>
</tr>
</table>
</div>
<p>You might also need to remove the entry &#8220;rewrite_rules&#8221; in your wp_options table.</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2011/06/01/changing-the-site-url-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Allow iframe in WordPress Posts</title>
		<link>http://webdesign.onyou.ch/2011/05/20/allow-iframe-in-wordpress-posts/</link>
		<comments>http://webdesign.onyou.ch/2011/05/20/allow-iframe-in-wordpress-posts/#comments</comments>
		<pubDate>Fri, 20 May 2011 18:15:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=791</guid>
		<description><![CDATA[If you’ve ever tried adding an iframe to your WordPress post, and then switched the TinyMCE editor to Visual mode, you’ve found that the editor strips out your iframe code. This can be annoying. Just add this snippet to the functions.php file in your theme folder to prevent TinyMCE from killing your iframe. &#160; function [...]]]></description>
			<content:encoded><![CDATA[<p>If you’ve ever tried adding an iframe to your WordPress post, and then switched the TinyMCE editor to Visual mode, you’ve found that the editor strips out your iframe code. This can be annoying. Just add this snippet to the functions.php file in your theme folder to prevent TinyMCE from killing your iframe.</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> add_iframe<span style="color: #009900;">&#40;</span><span style="color: #000088;">$arr</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'extended_valid_elements'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$arr</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tiny_mce_before_init'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'add_iframe'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$allowedposttags</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$allowedposttags</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;iframe&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">&quot;id&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;class&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;title&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;style&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;align&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;frameborder&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;longdesc&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;marginheight&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;marginwidth&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;name&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;scrolling&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">&quot;src&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">&quot;height&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">&quot;width&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2011/05/20/allow-iframe-in-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Launch Fancybox automatically</title>
		<link>http://webdesign.onyou.ch/2011/05/04/launch-fancybox-automatically/</link>
		<comments>http://webdesign.onyou.ch/2011/05/04/launch-fancybox-automatically/#comments</comments>
		<pubDate>Wed, 04 May 2011 13:36:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[fancybox]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=790</guid>
		<description><![CDATA[Fancybox currently does not directly support a way to automatically launch. The work around I was able to get working is creating a hidden anchor tag and triggering it&#8217;s onclick event. Make sure your call to trigger the onclick event is included after the jquery and fancybox js files are included. The code I used [...]]]></description>
			<content:encoded><![CDATA[<p>Fancybox currently does not directly support a way to automatically launch. The work around I was able to get working is creating a hidden anchor tag and triggering it&#8217;s onclick event. Make sure your call to trigger the onclick event is included after the jquery and fancybox js files are included. The code I used is as follows:</p>
<p>This sample script is embedded directly in the html, but it could also be included in a js file.</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="javascript" style="font-family:monospace;">&lt;pre&gt;&lt;code&gt;<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
    $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#hidden_link&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fancybox</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">trigger</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>&lt;/code&gt;</pre>
</td>
</tr>
</table>
</div>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2011/05/04/launch-fancybox-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decode HTML entities with jQuery</title>
		<link>http://webdesign.onyou.ch/2011/05/03/decode-html-entities-with-jquery/</link>
		<comments>http://webdesign.onyou.ch/2011/05/03/decode-html-entities-with-jquery/#comments</comments>
		<pubDate>Tue, 03 May 2011 08:28:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Decode]]></category>
		<category><![CDATA[Encode]]></category>
		<category><![CDATA[HTML entities]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=788</guid>
		<description><![CDATA[Decoding HTML entities can be so easy with jQuery. The following code snippet converts all HTML entities to their applicable characters: var encoded = &#34;&#38;quot; &#38;apos; &#38;amp; &#38;lt; &#38;gt;&#34;; alert&#40;encoded&#41;; var decoded = $&#40;'&#60;textarea /&#62;'&#41;.html&#40;encoded&#41;.val&#40;&#41;; alert&#40;decoded&#41;; or var decoded = $&#40;&#34;&#60;div/&#62;&#34;&#41;.html&#40;encoded&#41;.text&#40;&#41;;]]></description>
			<content:encoded><![CDATA[<p>Decoding HTML entities can be so easy with jQuery. The following code snippet converts all HTML entities to their applicable characters:<br />
<span id="more-788"></span></p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> encoded <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&amp;quot; &amp;apos; &amp;amp; &amp;lt; &amp;gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>encoded<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> decoded <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;textarea /&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>encoded<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>decoded<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
<p>or</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> decoded <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;div/&gt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>encoded<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</td>
</tr>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2011/05/03/decode-html-entities-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross Domain Iframe Height Resize</title>
		<link>http://webdesign.onyou.ch/2010/12/28/cross-domain-iframe-height-resize/</link>
		<comments>http://webdesign.onyou.ch/2010/12/28/cross-domain-iframe-height-resize/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 10:11:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browser]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[cross-domain]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[postmessage]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=787</guid>
		<description><![CDATA[If you try to set an iframe height which is hosted in another domain, the browser might throw security exception. So here is my solution to get it work in every browser based on the cross-domain jQuery postMessage Plugin. Note that both parent and child need to include the jQuery postMessage javascript. The parent frame [...]]]></description>
			<content:encoded><![CDATA[<p>If you try to set an iframe height which is hosted in another domain, the browser might throw security exception. So here is my solution to get it work in every browser based on the cross-domain jQuery <a href="http://benalman.com/projects/jquery-postmessage-plugin/" title="jQuery postMessage: Cross-domain scripting goodness">postMessage </a> Plugin.<span id="more-787"></span></p>
<p>Note that both parent and child need to include the jQuery <a href="https://github.com/cowboy/jquery-postmessage" title="jQuery postmessage on github">postMessage</a> javascript. </p>
<p><strong>The parent frame code</strong></p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td>
<pre class='lines'>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21</pre>
</td>
<td>
<pre class="javascript" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.ba-postmessage.min.js&quot;&gt;&lt;/script&gt;
&nbsp;
&lt;div id=&quot;iframe&quot;&gt;&lt;/div&gt;
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> if_height<span style="color: #339933;">,</span>
       src <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://childframeurl.com#'</span> <span style="color: #339933;">+</span> encodeURIComponent<span style="color: #009900;">&#40;</span> document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
       iframe <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'&lt;iframe &quot; src=&quot;'</span> <span style="color: #339933;">+</span> src <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; width=&quot;700&quot; height=&quot;1000&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot;&gt;&lt;<span style="color: #000099; font-weight: bold;">\/</span>iframe&gt;'</span> <span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'#iframe'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
       setInterval<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> getHeight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
             $.<span style="color: #660066;">receiveMessage</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> h <span style="color: #339933;">=</span> Number<span style="color: #009900;">&#40;</span> e.<span style="color: #660066;">data</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span> <span style="color: #009966; font-style: italic;">/.*if_height=(\d+)(?:&amp;|$)/</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'$1'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>isNaN<span style="color: #009900;">&#40;</span> h <span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> h <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">&amp;&amp;</span> h <span style="color: #339933;">!==</span> if_height <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #006600; font-style: italic;">// Height has changed, update the iframe.</span>
                    iframe.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span> if_height <span style="color: #339933;">=</span> h <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
             <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p><strong>The child frame code</strong></p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td>
<pre class='lines'>1
2
3
4
5
6
7
8
9
10
11
12
13
14</pre>
</td>
<td>
<pre class="javascript" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.ba-postmessage.min.js&quot;&gt;&lt;/script&gt;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
             <span style="color: #003366; font-weight: bold;">var</span> parent_url <span style="color: #339933;">=</span> decodeURIComponent<span style="color: #009900;">&#40;</span> document.<span style="color: #660066;">location</span>.<span style="color: #660066;">hash</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span> <span style="color: #009966; font-style: italic;">/^#/</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>link<span style="color: #339933;">;</span>
&nbsp;
             <span style="color: #003366; font-weight: bold;">function</span> setHeight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    $.<span style="color: #660066;">postMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span> if_height<span style="color: #339933;">:</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">outerHeight</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> parent_url<span style="color: #339933;">,</span> parent <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
             <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
             setHeight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
             setInterval<span style="color: #009900;">&#40;</span>setHeight<span style="color: #339933;">,</span> <span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>jQuery<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre>
</td>
</tr>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2010/12/28/cross-domain-iframe-height-resize/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Absolute and relative URLs</title>
		<link>http://webdesign.onyou.ch/2010/12/26/absolute-and-relative-urls/</link>
		<comments>http://webdesign.onyou.ch/2010/12/26/absolute-and-relative-urls/#comments</comments>
		<pubDate>Sun, 26 Dec 2010 11:26:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[absolute url]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[relative url]]></category>
		<category><![CDATA[uri]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=782</guid>
		<description><![CDATA[The URI general syntax allows a resource to be specified as an absoluteor a relative URL. Absolute URLs identify the protocol http://, the host, and the path of the resource, and can be used alone to locate a resource. Here&#8217;s an example absolute URL: http://webdesign.onyou.ch/2010/12/26/absolute-and-relative-urls/ Relative URLs don&#8217;t contain all the components and are always [...]]]></description>
			<content:encoded><![CDATA[<p>The URI general syntax allows a resource to be specified as an absoluteor a relative URL. Absolute URLs identify the protocol http://, the host, and the path of the resource, and can be used alone to locate a resource. <span id="more-782"></span>Here&#8217;s an example absolute URL:</p>
<p><span class="highlight1">http://webdesign.onyou.ch/2010/12/26/absolute-and-relative-urls/</span></p>
<p>Relative URLs don&#8217;t contain all the components and are always considered with respect to a base URL. A relative URL is resolved to an absolute URL, with respect to the base URL. Typically, a relative URL contains the path components of a resource and allows related sets of resources to reference each other in a relative way. This allows path hierarchies to be readily changed without the need to change every URL embedded in a set of documents.</p>
<p>The following table shows several relative URLs and how they are resolved to the corresponding absolute URLs given the base URL <em>http://onyou.ch/a/b/c.html?foo=bar</em>.</p>
<table border="1" cellspacing="0" cellpadding="1" width="100%">
<colgroup span="2"></colgroup>
<tbody>
<tr>
<th>Relative URL</th>
<th>Absolute URL with respect to http://onyou.ch/a/b/c.html?foo=bar</th>
</tr>
<tr>
<td>d.html</td>
<td>http://onyou.ch/a/b/d.html</td>
</tr>
<tr>
<td>e/d.html</td>
<td>http://onyou.ch/a/b/e/d.html</td>
</tr>
<tr>
<td>/d.html</td>
<td>http://onyou.ch/d.html</td>
</tr>
<tr>
<td>../d.html</td>
<td>http://onyou.ch/a/d.html</td>
</tr>
<tr>
<td>#xyz</td>
<td>http://onyou.ch/a/b/c.html?foo=bar#xyz</td>
</tr>
<tr>
<td>./</td>
<td>http://onyou.ch/a/b/</td>
</tr>
<tr>
<td>../</td>
<td>http://onyou.ch/a/</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2010/12/26/absolute-and-relative-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Googleon and Googleoff Tags</title>
		<link>http://webdesign.onyou.ch/2010/12/17/tell-google-to-not-index-certain-parts-of-your-page/</link>
		<comments>http://webdesign.onyou.ch/2010/12/17/tell-google-to-not-index-certain-parts-of-your-page/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 19:38:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[nofollow]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=778</guid>
		<description><![CDATA[There are several ways to instruct Google to stay away from various pages in your site: Robots.txt directives Nofollow attributes on links Meta noindex/nofollow directives X-Robots noindex/nofollow directives ..and so on. These directives all function in different ways, but they all serve the same basic purpose: control how Google crawls the various pages on your [...]]]></description>
			<content:encoded><![CDATA[<p>There are several ways to instruct Google to stay away from various pages in your site:</p>
<ul>
<li>Robots.txt directives</li>
<li>Nofollow attributes on links</li>
<li>Meta noindex/nofollow directives</li>
<li>X-Robots noindex/nofollow directives</li>
</ul>
<p>..and so on. These directives all function in different ways, but they all serve the same basic purpose: control how Google crawls the various pages on your site. For example, you can use meta noindex to instruct Google not to index your sitemap, RSS feed, or any other page you wish. This level of control over which pages are crawled and indexed is helpful, but what if you need to control how Google crawls the contents of a specific page? Easy. Google enables us to do this with a set of googleon/googleoff tags.</p>
<h3 class="vline_red">ABOUT GOOGLEON AND GOOGLEOFF TAGS</h3>
<p>Put simply, the googleon/googleoff tags tell Google Search Appliance when to start and stop indexing various parts of the web document. Consider the following example:</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>This is normal (X)HTML content that will be indexed by Google.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--googleoff: index--&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>This (X)HTML content will NOT be indexed by Google.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--googleon: index--&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p>In this example, we see how the googleon/googleoff tags will prevent the second paragraph from being indexed by Google. Notice the “index” parameter, which may be set to any of the following:</p>
<ul>
<li><strong>index</strong> &#8211; content surrounded by “googleoff: index” will not be indexed by Google</li>
<li><strong>anchor</strong> &#8211; anchor text for any links within a “googleoff: anchor” area will not be associated with the target page</li>
<li><strong>snippet</strong> &#8211; content surrounded by “googleoff: snippet” will not be used to create snippets for search results</li>
<li><strong>all</strong> &#8211; content surrounded by “googleoff: all” are treated with all attributes: index, anchor, and snippet</li>
</ul>
<p>Cool, eh? Let’s have a look at a specific usage example..</p>
<h3 class="vline_red">USING GOOGLEON AND GOOGLEOFF TAGS</h3>
<p>Let’s say your comment threads tend to stray into off-topic conversation. Keeping your pages as tightly focused on the subject at hand is a great way to improve the on-page relevancy of your targeted keywords while improving the accuracy of matching search queries. Thus, to keep the superfluous banter out of the Google index, you could add googleon/googleoff tags as follows:</p>
<div class='lu-syntax' style=''>
<table>
<tr>
<td></td>
<td>
<pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--googleoff: all--&gt;</span>
&nbsp;
<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;comments&quot;</span>&gt;</span>
&nbsp;
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Nick Mason<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span> - August 2nd, 2009<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>From Her Majesty the queen. His boots were very clean.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Rick Wright<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span> - August 3rd, 2009<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Every year is getting shorter, never seem to find the time.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>David Gilmour<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span> - August 4th, 2009<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>By the river holding hands roll me up and lay me down.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">strong</span>&gt;</span>Roger Waters<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">strong</span>&gt;</span> - August 5th, 2009<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>And after a while, you can work on points for style.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--googleon: all--&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p>We definitely don’t want to see such a mindless thread in Google, and it will be interesting to see if the &lt;pre&gt; example gets dropped from the index..</p>
<h3 class="vline_red">MAY THE FORCE BE WITH YOU</h3>
<p>While using this method to control how Google indexes your on-page content, there are a couple of things you should keep in mind. First, there is a difference between <em>indexing</em> and <em>crawling</em>. Google may crawl portions of your page that are demarcated with googleon/googleoff tags. So in case you were thinking that this technique may be a way to deal with <a href="http://thenexus.tk/google-new-nofollow-policy/">Google’s new nofollow policy</a>, forget about it — PageRank will continue to flow through any links contained within a googleoff zone.</p>
<p>Besides this, also keep in mind that this is a proprietary technique supported exclusively by Google Search Appliance. If you have content that you want to keep out of the index of <em>all</em>search engines, then you will need to find <a href="http://digwp.com/2009/08/password-protect-more-than-the_content/">another way to do it</a>. Eventually, Yahoo! and MSN/Live/Bing/Whatever may create proprietary “on/off tags” of their own, but chances are slim to none that they will obey the proprietary technology of the mighty Google.</p>
<p>For more information about googleon/googleoff tags, check out Google’s <a href="http://code.google.com/apis/searchappliance/documentation/46/admin_crawl/Preparing.html">official documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2010/12/17/tell-google-to-not-index-certain-parts-of-your-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test your Website with webpagetest.org</title>
		<link>http://webdesign.onyou.ch/2010/12/08/test-your-website-with-webpagetest-org/</link>
		<comments>http://webdesign.onyou.ch/2010/12/08/test-your-website-with-webpagetest-org/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 08:58:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browser]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Webservices]]></category>
		<category><![CDATA[debugger]]></category>
		<category><![CDATA[Internet Tools]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Pagetest]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[website performance]]></category>

		<guid isPermaLink="false">http://webdesign.onyou.ch/?p=775</guid>
		<description><![CDATA[When it comes to optimazing your web page performance, www.webpagetest.org is a very helpful tool to test your webpage and find out how to improve its performance. Through “Webpage Test” you can set a number of parameters before you begin testing a URL. The test results are comprehensively broken down into speed tests, JavaScript file [...]]]></description>
			<content:encoded><![CDATA[<p>When it comes to optimazing your web page performance, <a title="Test a website's performance" href="http://www.webpagetest.org/" target="_blank">www.webpagetest.org</a> is a very helpful tool to test your webpage and find out how to improve  its performance. Through “Webpage Test” you can set a number of  parameters before you begin testing a URL. The test results are  comprehensively broken down into speed tests, JavaScript file sizes, and  image file sizes. The site also provides tools to compare the  performance of multiple websites.</p>
<div class="image_wrap  alignleft" style="width:0px">
<div class="small_frame nomargin"><a href="http://www.webpagetest.org/" target="_blank"><img alt="Test your Website with webpagetest.org" title="" src="http://webdesign.onyou.ch/wp-content/themes/lunuc/lib/functions/thumb.php?src=http://webdesign.onyou.ch/blogs.dir/6/files/2010/12/webpagetest.png&amp;w=-14&amp;h=280&amp;zc=0&amp;q=100&amp;p=0" style="" width="-14" height="280"/></a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://webdesign.onyou.ch/2010/12/08/test-your-website-with-webpagetest-org/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

Served from: webdesign.onyou.ch @ 2012-02-05 18:31:42 -->
