<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Timersys</title>
	
	<link>http://blog.timersys.com</link>
	<description>PHP, JQuery y mucho más</description>
	<lastBuildDate>Wed, 08 Sep 2010 18:48:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Timersys" /><feedburner:info uri="timersys" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Timersys</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Que es Google instant ?</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/8auoNXCDhkc/</link>
		<comments>http://blog.timersys.com/noticias/que-es-google-instant/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 18:48:03 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Noticias]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=543</guid>
		<description><![CDATA[Si todavía no saben que es Google instant se puede decir que definitivamente no están a la última en Internet. Google instant es la nueva forma de buscar que acaba de lanzar Google donde los resultados aparecen antes de escribir nuestra búsqueda. Uno se pregunta como es eso posible? Pues bien , con los algoritmos [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Fnoticias%2Fque-es-google-instant%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Fnoticias%2Fque-es-google-instant%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.google.com/"><img class="alignright" src="http://www.google.com/images/logo_sm.gif" alt="Google" width="150" height="55" /></a>Si todavía no saben que es <a href="http://www.google.com/instant/#utm_campaign=launch&amp;utm_medium=van&amp;utm_source=timersys">Google instant</a> se puede decir que definitivamente no están a la última en Internet. <strong>Google instant</strong> es la nueva forma de buscar que acaba de lanzar Google donde los resultados aparecen antes de escribir nuestra búsqueda.</p>
<p>Uno se pregunta como es eso posible? Pues bien , con los algoritmos de predicción que utiliza <strong>Google Instant</strong> ,a medida que uno escribe palabras  se van mostrando resultados relacionados con lo que buscamos. Por ejemplo si escribimos &#8220;como enviar un formulario via&#8221; el primer resultado que muestra (al menos a mi) es <a href="../jquery/como-enviar-un-formulario-via-ajax-con-jquery/"><em>Como enviar un formulario via</em> AJAX con JQuery | Timersys</a> , pero antes de mostrar esto ya me ha tirado un montón de resultados posibles más a mi búsqueda. Aunque en este caso ahorramos escribir la palabra <strong>AJAX</strong> , la gente de Google asegura que se ahorra un promedio de 2-5 segundos por búsqueda. Creo que es cuestión de ir probando a ver como nos funciona a cada uno de nosotros y si los resultados que &#8220;predice&#8221; son los que realmente buscamos.</p>
<p>Otra cosa que me llamo la atención es la velocidad con que tira resultados, da la impresión de que estas buscando en un servidor local <img src='http://blog.timersys.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Como les va a ustedes? Prefieren el nuevo método de búsqueda? Ahhh me olvidaba, para que les funcione tan solo tienen que loguearse con su cuenta de Google. Saludos!</p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/8auoNXCDhkc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/noticias/que-es-google-instant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/noticias/que-es-google-instant/</feedburner:origLink></item>
		<item>
		<title>Nautiic – Mi proyecto personal más ambicioso</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/RfEs0hbfScI/</link>
		<comments>http://blog.timersys.com/noticias/nautiic-mi-proyecto-personal-mas-ambicioso/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 19:27:03 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Noticias]]></category>
		<category><![CDATA[nautiic]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=523</guid>
		<description><![CDATA[Hoy les presento con todo mi orgullo mi proyecto más ambicioso. Nautiic es un directorio náutico donde uno puede desde vender barcos usados, hasta alquilar una tabla de surf o anunciar su empresa de pesca. Es un directorio donde anunciar es gratis y se puede encontrar de todo. La idea nació cuando un amigo me [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Fnoticias%2Fnautiic-mi-proyecto-personal-mas-ambicioso%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Fnoticias%2Fnautiic-mi-proyecto-personal-mas-ambicioso%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-528" title="nautiic" src="http://blog.timersys.com/wp-content/uploads/2010/09/nautiic3.png" alt="Nautiic directorio náutico" width="400" height="222" /></p>
<p style="text-align: left;">Hoy les presento con todo mi orgullo mi proyecto más ambicioso. <strong><a href="http://nautiic.com.ar">Nautiic</a> </strong>es un <strong>directorio náutico</strong> donde uno puede desde <strong>vender barcos usados</strong>, hasta alquilar una tabla de <strong>surf</strong> o <strong>anunciar su empresa</strong> de pesca. Es un directorio donde <strong>anunciar es gratis </strong>y se puede encontrar de todo.</p>
<p style="text-align: left;">La idea nació cuando un amigo me preguntó donde podía buscar en Internet para comprarse una tabla de surf y no supe contestarle. La verdad es que existen miles de directorios , pero son directorios globales donde se anuncia de todo y nada a la vez. Pocos son los directorios o listados específicos como <strong>Nautiic </strong>donde si queremos comprar un yate de segunda mando (ya me gustaría a mi) o vender la caña de pescar que no usamos más o simplemente anunciar los productos y servicios de nuestra empresa sabremos adonde acudir y adonde va a acudir la gente.</p>
<p style="text-align: left;">Actualmente Nautiic esta disponible en los siguientes países:</p>
<ul>
<li> <img class="alignnone size-full wp-image-535" title="us" src="http://blog.timersys.com/wp-content/uploads/2010/09/ar.png" alt="" width="16" height="11" /> <a href="http://nautiic.com.ar">Nautiic Argentina</a></li>
<li><img class="alignnone size-full wp-image-535" title="us" src="http://blog.timersys.com/wp-content/uploads/2010/09/us.png" alt="" width="16" height="11" /> <a href="http://nautiic.com">Nautiic USA</a></li>
<li><img class="alignnone size-full wp-image-535" title="us" src="http://blog.timersys.com/wp-content/uploads/2010/09/es.png" alt="" width="16" height="11" /> <a href="http://nautiic.es">Nautiic España</a></li>
<li><img class="alignnone size-full wp-image-535" title="us" src="http://blog.timersys.com/wp-content/uploads/2010/09/it.png" alt="" width="16" height="11" /> <a href="http://nautiic.it">Nautiic Italia</a></li>
<li><img class="alignnone size-full wp-image-535" title="us" src="http://blog.timersys.com/wp-content/uploads/2010/09/english.gif" alt="" width="16" height="11" /> <a href="http://nautiic.co.uk">Nautiic UK</a></li>
<li><img class="alignnone size-full wp-image-535" title="us" src="http://blog.timersys.com/wp-content/uploads/2010/09/fr.png" alt="" width="16" height="11" /> <a href="http://nautiic.fr">Nautiic France</a></li>
<li><img class="alignnone size-full wp-image-535" title="us" src="http://blog.timersys.com/wp-content/uploads/2010/09/mx.png" alt="" width="16" height="11" /> <a href="http://nautiic.com.mx">Nautiic México</a></li>
</ul>
<p>Al día de la fecha aún no he empezado a promocionar <strong>Nautiic</strong> y aún quedan algunas traducciones por terminar. Este es el primer lugar donde lo menciono así que les pido a todos los que me leen que si tienen la posibilidad me ayuden a difundirlo ya sea con un pequeño artículo o simplemente un tweet <img src='http://blog.timersys.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Ayer termine de subir <a href="http://nautiic.com.ar">Nautiic Argentina</a> y hace unos 20 que subí <a href="http://nautiic.com">Nautiic USA</a> y a día de hoy <a href="http://www.google.com.ar/search?q=site%3Ahttp%3A%2F%2Fnautiic.com">Google</a> ya indexo más de 24000 páginas y espero que siga creciendo a medida que se empiece a generar el tráfico web. Así que ya saben , empiecen a correr la voz <img src='http://blog.timersys.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/RfEs0hbfScI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/noticias/nautiic-mi-proyecto-personal-mas-ambicioso/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/noticias/nautiic-mi-proyecto-personal-mas-ambicioso/</feedburner:origLink></item>
		<item>
		<title>WordPress qTranslate y Twitter Tools funcionando Juntos</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/Bizygpx_LyI/</link>
		<comments>http://blog.timersys.com/recursos/wordpress-qtranslate-y-twitter-tools-funcionando-juntos/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 17:58:19 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Recursos]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[qtranslate]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=519</guid>
		<description><![CDATA[Hoy diseñando la web de un cliente basada en WordPress me encontre con un pequeño problema a la hora de integrarla a Twitter ya que la web es multilenguaje y utiliza el plugin qTranslate para añadir dicha función en el blog. En mi opinión este plugin es el más fácil de manipular para integrarlo en [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Fwordpress-qtranslate-y-twitter-tools-funcionando-juntos%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Fwordpress-qtranslate-y-twitter-tools-funcionando-juntos%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Hoy diseñando la web de un <a href="http://www.tocadomorro.com">cliente</a> basada en WordPress me encontre con un pequeño problema a la hora de integrarla a <a href="http://twitter.com/chifliiiii">Twitter</a> ya que la web es multilenguaje y utiliza el plugin <a href="http://wordpress.org/extend/plugins/qtranslate/">qTranslate</a> para añadir dicha función en el blog. En mi opinión este plugin es el más fácil de manipular para integrarlo en un proyecto y es el que vengo usando hace tiempo en mis diseños pero nunca antes había usado los dos plugins juntos.<br />
<span id="more-519"></span><br />
El problema es que <strong>qTranslate </strong>utiliza etiquetas del estilo <mark style="background-color:#FFFF88;"> &lt;!&#8211;:es&#8211;&gt;Titulo del post &lt;!&#8211;:&#8211;&gt;&lt;!&#8211;:en&#8211;&gt;Post title&lt;!&#8211;:&#8211;&gt;</mark> para los diferentes idiomas y guarda todo en la base de datos de forma que el título contiene los 2(o más) idiomas, el contenido del post lo mismo, etc</p>
<p>Por lo que a la hora de publicar un Tweet a traves de <strong>Twitters Tools</strong> queda de la siguiente manera: [Nuevo Post]  &lt;!&#8211;:es&#8211;&gt;Titulo del post &lt;!&#8211;:&#8211;&gt;&lt;!&#8211;:en&#8211;&gt;Post title&lt;!&#8211;:&#8211;&gt; http://bit.ly/bSenEv</p>
<p>Para corregir esto debemos busca la siguiente linea dentro de <strong>twitter-tools.php</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>490
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$tweet</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tw_text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tweet_format</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter-tools'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #339933;">@</span><span style="color: #990000;">html_entity_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_COMPAT</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Y cambiarla por:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>490
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$tweet</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tw_text</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tweet_format</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'twitter-tools'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #339933;">@</span><span style="color: #990000;">html_entity_decode</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_title</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_COMPAT</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Usando la funcion GetText que en wordpress es __() obtendremos el título en el idioma que esta activo actualmente.Eso es todo, así ya nuestros tweets se van a ver de forma correcta.</p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/Bizygpx_LyI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/recursos/wordpress-qtranslate-y-twitter-tools-funcionando-juntos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/recursos/wordpress-qtranslate-y-twitter-tools-funcionando-juntos/</feedburner:origLink></item>
		<item>
		<title>Las mejores nuevas características y técnicas de HTML5 – Parte III</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/q9LfKmhQnAE/</link>
		<comments>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-%e2%80%93-parte-iii/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 19:23:25 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Recursos]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=505</guid>
		<description><![CDATA[Despues de mi dos últimos posts acerca de HTML5 voy a terminar esta serie hablando del nuevo elemento &#60;canvas&#62; uno de los más revolucionarios de HTML5 por la cantidad de opciones que brinda y por la cantidad de cosas que uno puedo hacer con el. Básicamente es un lienzo que nos permite dibujar gráficos o [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Flas-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-%25e2%2580%2593-parte-iii%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Flas-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-%25e2%2580%2593-parte-iii%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Despues de mi dos últimos posts acerca de <a href="http://blog.timersys.com/tag/html5/">HTML5</a> voy a terminar esta serie hablando del nuevo elemento <strong>&lt;canvas&gt;</strong> uno de los más revolucionarios de<strong> HTML5</strong> por la cantidad de opciones que brinda y por la cantidad de cosas que uno puedo hacer con el. Básicamente es un lienzo que nos permite dibujar gráficos o renderizar imágenes en la web mediante scripts (principalmente Javascript), permitiéndonos así realizar cosas que hasta ahora solo podíamos hacer con flash o con plugins externos.</p>
<p><span id="more-505"></span></p>
<h3>21.Introducción a &lt;canvas&gt; de HTML5</h3>
<p>Para crear un elementos canvas tan solo debemos especificar su largo y ancho de la siguiente manera. En caso que el navegador no lo soporte se mostrara el mensaje de su interior.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;canvas <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;myCanvas&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;100&quot;</span>&gt;</span>
Tu navegador no soporta canvas
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>canvas&gt;</span></pre></td></tr></table></div>

<p>Como ven crear el objeto canvas es muy sencillo la parte dificil viene a la hora de &#8220;dibujar&#8221; en el. Para ellos nos ayudamos de <a href="http://blog.timersys.com/tag/javascript/">Javascript</a></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="javascript" style="font-family:monospace;"><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: #003366; font-weight: bold;">var</span> c<span style="color: #339933;">=</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;myCanvas&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">//Accedemos al elementos camvas</span>
<span style="color: #003366; font-weight: bold;">var</span> cxt<span style="color: #339933;">=</span>c.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;2d&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">//creamos el objeto a dibujar</span>
cxt.<span style="color: #660066;">fillStyle</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;#FF0000&quot;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">//escogemos color rojo</span>
cxt.<span style="color: #660066;">fillRect</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">150</span><span style="color: #339933;">,</span><span style="color: #CC0000;">75</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">// le damos forma</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p><canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;"><br />
Tu navegador no soporta canvas<br />
</canvas></p>
<p><script type="text/javascript">var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.fillStyle="#FF0000";
cxt.fillRect(0,0,150,75);</script></p>
<h4>Entendiendo como funciona fillRect</h4>
<p>El método fillRect tiene los siguientes parámetros (0,0,150,75).<br />
Esto quiere decir que dibuje un rectángulo de 150 x 75 empezando en las coordenadas 0,0 (esquina superior izq) . Canvas utiliza las coordenadas x y para dibujar en el lienzo. Podes ver a continuación como funciona.</p>
<table>
<tbody>
<tr>
<td>&nbsp;</td>
<td style="width: 200px; text-align: center;" align="center" width="200">X</td>
<td style="width: 180px;" width="180">&nbsp;</td>
</tr>
<tr>
<td style="height: 100px;" height="100" valign="middle">Y</td>
<td colspan="2" rowspan="2">
<iframe frameborder="0" scrolling="no" style="width: 400px; height: 120px;" src="http://www.w3schools.com/html5/tryhtml5_canvas_coordinates.htm"></iframe>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>Tambien podemos dibujar círculos por ejemplo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><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>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> c<span style="color: #339933;">=</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;myCanvas&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> cxt<span style="color: #339933;">=</span>c.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;2d&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
cxt.<span style="color: #660066;">fillStyle</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;#FF0000&quot;</span><span style="color: #339933;">;</span>
cxt.<span style="color: #660066;">beginPath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
cxt.<span style="color: #660066;">arc</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">70</span><span style="color: #339933;">,</span><span style="color: #CC0000;">28</span><span style="color: #339933;">,</span><span style="color: #CC0000;">20</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>Math.<span style="color: #660066;">PI</span><span style="color: #339933;">*</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
cxt.<span style="color: #660066;">closePath</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
cxt.<span style="color: #660066;">fill</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p><canvas id="myCanvas2" width="200" height="100" style="border:1px solid #c3c3c3;"><br />
Tu navegador no soporta canvas<br />
</canvas></p>
<p><script type="text/javascript">var c=document.getElementById("myCanvas2");
var cxt=c.getContext("2d");
cxt.fillStyle="#FF0000";
cxt.beginPath();
cxt.arc(70,28,20,0,Math.PI*2,true);
cxt.closePath();
cxt.fill();</script></p>
<p>O se pueden realizar verdaderas obras de arte como las realizadas por <a href="http://www.effectgames.com/demos/canvascycle/">Mark Ferrari</a></p>
<p><img src="http://blog.timersys.com/wp-content/uploads/2010/08/obra.gif" alt="" title="obra" width="451" height="302" class="aligncenter size-full wp-image-513" /></p>
<h4>Dibujar imágenes en canvas</h4>
<p>Podemos dibujar una imagen en canvas con la siguiente función</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><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>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> c<span style="color: #339933;">=</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;myCanvas3&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> cxt<span style="color: #339933;">=</span>c.<span style="color: #660066;">getContext</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;2d&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> img <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">//indico la URL de la imagen</span>
img.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'imagen.gif'</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">//defino el evento onload del objeto imagen</span>
 img.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</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: #006600; font-style: italic;">//incluyo la imagen en el canvas</span>
         cxt.<span style="color: #660066;">drawImage</span><span style="color: #009900;">&#40;</span>img<span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p><canvas id="myCanvas3" width="200" height="100" style="border:1px solid #c3c3c3;"><br />
Tu navegador no soporta canvas<br />
</canvas></p>
<p><script type="text/javascript">var c=document.getElementById("myCanvas3");
var cxt=c.getContext("2d");
var img = new Image();
//indico la URL de la imagen
img.src = 'http://blog.timersys.com/wp-content/themes/transgravita/images/logocorto.jpg';
//defino el evento onload del objeto imagen
 img.onload = function(){
         //incluyo la imagen en el canvas
         cxt.drawImage(img, 10, 10);
}</script></p>
<p>Para aprender más de canvas pueden visitar <a href="http://www.desarrolloweb.com/manuales/manual-canvas-html5.html">este excelente manual</a> echo para desarolloweb.com</p>
<p>Y con esto doy por concluida esta introducción a las nuevas técnicas y características de HTML5, espero que lo hayan disfrutado. Un saludo!!</p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/q9LfKmhQnAE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-%e2%80%93-parte-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-%e2%80%93-parte-iii/</feedburner:origLink></item>
		<item>
		<title>Las mejores nuevas características y técnicas de HTML5 – Parte II</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/_YS7EYme7a0/</link>
		<comments>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-de-html5-parte-ii/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 02:25:08 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Recursos]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=495</guid>
		<description><![CDATA[Siguiendo con mi post anterior vamos a seguir numerando algunas nuevas técnicas y características de HTML5 que nos van a ayudar a escribir códigos más cortos, validar formularios, reproducir música y videos, crear aplicaciones locales y muchas cosas más. 11. Soporte para audio Aunque aun queda mucho camino por recorrer los navegadores más actuales soportan [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Flas-mejores-nuevas-caracteristicas-de-html5-parte-ii%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Flas-mejores-nuevas-caracteristicas-de-html5-parte-ii%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Siguiendo con mi <a href="http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-parte-i/">post anterior</a> vamos a seguir numerando algunas nuevas técnicas y características de HTML5 que nos van a ayudar a escribir códigos más cortos, validar formularios, reproducir música y videos, crear aplicaciones locales y muchas cosas más.</p>
<p><span id="more-495"></span></p>
<h3>11. Soporte para audio</h3>
<p>Aunque aun queda mucho camino por recorrer los navegadores más actuales soportan este nuevo elemento evitando así el uso de plugins y librerías externas. Aunque eso sí, como siempre con diferencias entre unos y otros, mientras firefox se decanto por soportar archivos <a href="http://es.wikipedia.org/wiki/Ogg">.ogg</a>, webkit funciona con .mp3, internet explorer para variar no soporta ningún formato y opera de momento solo .wav</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;audio autoplay<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;autoplay&quot;</span> controls<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;controls&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;source <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file.ogg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;source <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file.mp3&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file.mp3&quot;</span>&gt;</span>Download this file.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>audio&gt;</span></pre></td></tr></table></div>

<p>De este modo por ejemplo Safari se saltaría el archivo .ogg y reproduciría el .mp3</p>
<h3>12. Soporte para video</h3>
<p>Al igual que en el elemento Audio los navegadores están divididos sobre que formato de video apoyar en un futuro. Mientras Firefox y Opera apoyan los formatos abiertos de <a href="http://es.wikipedia.org/wiki/Theora">Theora</a> y <a href="http://es.wikipedia.org/wiki/Vorbis">Vorbis</a> , Safari e Internet Explorer soportan <a href="http://es.wikipedia.org/wiki/H.264/MPEG-4_AVC">H.264</a>, formato no abierto que es soportado por los reproductores flash actuales.<br />
Por lo que a la hora de ofertar videos en nuestras web debemos ofrecer ambas alternativas al igual que hicimos con el audio</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;video controls preload&gt;</span>
	<span style="color: #009900;">&lt;source <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-gracioso.ogv&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video/ogg; codecs='vorbis, theora'&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;source <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-gracioso.mp4&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video/mp4; 'codecs='avc1.42E01E, mp4a.40.2'&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span> Tu navegador no lo soporta. <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;video-gracioso.mp4&quot;</span>&gt;</span>Puedes descargar el video.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> <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: #66cc66;">/</span>video&gt;</span></pre></td></tr></table></div>

<p>Aunque por norma no es necesario especificar el atributo <strong>type</strong> haciéndolo ahorramos un poco de trabajo al navegador ya que sino lo tendría que averiguar por si solo.<br />
Por otro lado si tu navegador no soporta <strong>HTML5 video</strong> podes optar por un link de descarga del video o simplemente colocar el video en formato flash como alternativa.</p>
<h3>13. Atributos &#8220;preload&#8221; y &#8220;controls&#8221;</h3>
<p>Estos dos nuevos atributos vistos en los elementos <strong>HTML5 audio</strong> y <strong>HTML5 video</strong> se describen por si solos.<br />
El atributo <strong>controls</strong> añade los controles (play, pause,etc) para controlar los videos y audios.</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;video controls&gt;</span></pre></td></tr></table></div>

<p>Y el atributo <strong>preload</strong> hace una precarga del video para ahorrar algo de tiempo en la experiencia del usuario. Si la página esta diseñada para mostrar un video deberíamos activarlo en cambio si no estamos seguro que el usuario desee verlo ya que es algo secundario dentro del contenido, no lo incluiremos.</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;video controls preload&gt;</span></pre></td></tr></table></div>

<h3>14. Expresiones regulares con el nuevo atributo pattern</h3>
<p>Otro nuevo atributo que hará más fácil la validación de formularios sin el uso de Javascript. En el siguiente ejemplo un usario deberá crear un username que conste de letras mayúsculas o minúsculas con más de 4 caracteres y menos de 10.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;username&quot;</span>&gt;</span>Crear un Username: <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
   	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span></span>
<span style="color: #009900;">	   <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;username&quot;</span></span>
<span style="color: #009900;">	   <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;username&quot;</span></span>
<span style="color: #009900;">	   pattern<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;[A-Za-z]{4,10}&quot;</span></span>
<span style="color: #009900;">	   autofocus</span>
<span style="color: #009900;">	   required&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">button</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span>&gt;</span>Crear <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">button</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></td></tr></table></div>

<p>Para más información sobre expresiones regulares visitar este <a href="http://www.desarrolloweb.com/manuales/expresiones-regulares.html">completo manual</a></p>
<h3>15. Nuevo elemento &lt;mark&gt;</h3>
<p>Este nuevo elemento es parecido a &lt;em&gt; o &lt;strong&gt; pero a diferencias de estos que sirven para darle valor o poder a una palabra &lt;mark&gt; esta pensado como un <mark style="background-color:#FFFF88;">resaltador</mark>. Algo muy utilizado en buscadores para resaltar las palabras mas relevantes y que un poco de javascript podríamos implementar.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h3</span>&gt;</span>Resultados de avion <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h3</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>El aeropuerto Pablo Picasso esta lleno de <span style="color: #009900;">&lt;mark <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;background-color:#FFFF88;&quot;</span>&gt;</span>avion<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>mark&gt;</span>es</pre></td></tr></table></div>

<h3>15. Atributo data para atributos personalizados</h3>
<p>Este &#8220;nuevo&#8221; atributo es muy útil cuando se quiere pasar valores a javascript por ejemplo. Antes podíamos utilizar cualquier atributo inventado por nosotros y nuestros scripts funcionaban , pero la validación fallaba. Ahora agregando data al atributo podremos usarlo sin problema como muestra el siguiente ejemplo.</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;myDiv&quot;</span> data-valorCualquiera<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Mi valor&quot;</span>&gt;</span> Bla Bla <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>Y para obtener dicho valor con JS</p>
<p>var theDiv = document.getElementById(&#8216;myDiv&#8217;);<br />
var attr = theDiv.getAttribute(&#8216;data-valorCualquiera&#8217;);<br />
alert(attr); // Mi valor</p>
<p>Incluso se puede usar con CSS para hacer un cambio de texto con la propiedad hover</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;es&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span>
   <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Texto cambiante<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
&nbsp;
h1 { position: relative; }
h1:hover { color: transparent; }
&nbsp;
h1:hover:after {
	content: attr(data-hover-response);
	color: black;
	position: absolute;
	left: 0;
&nbsp;
}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span> data-hover-response<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Que no me toques!!!&quot;</span>&gt;</span> No tocar  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>Podes ver un ejemplo funcionando <a href="http://blog.timersys.com/ejemplos/texto-cambiante/">aca</a>.</p>
<h3>16. Listado con todos los nuevos elementos de HTML5 (ingles)</h3>
<ul>
<li><a href="http://www.w3schools.com/html5/tag_article.asp">&lt;article&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_aside.asp">&lt;aside&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_audio.asp">&lt;audio&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_canvas.asp">&lt;canvas&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_command.asp">&lt;command&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_datalist.asp">&lt;datalist&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_details.asp">&lt;details&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_embed.asp">&lt;embed&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_figcaption.asp">&lt;figcaption&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_figure.asp">&lt;figure&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_footer.asp">&lt;footer&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_header.asp">&lt;header&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_hgroup.asp">&lt;hgroup&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_keygen.asp">&lt;keygen&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_mark.asp">&lt;mark&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_meter.asp">&lt;meter&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_nav.asp">&lt;nav&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_output.asp">&lt;output&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_progress.asp">&lt;progress&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_rp.asp">&lt;rp&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_rt.asp">&lt;rt&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_ruby.asp">&lt;ruby&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_section.asp">&lt;section&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_source.asp">&lt;source&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_summary.asp">&lt;summary&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_time.asp">&lt;time&gt;</a></li>
<li><a href="http://www.w3schools.com/html5/tag_video.asp">&lt;video&gt;</a></li>
</ul>
<h3>17. Los nuevos atributos de HTML5 (ingles)</h3>
<ul>
<li><a href="http://www.w3schools.com/html5/html5_ref_standardattributes.asp">Atributos standards</a></li>
<li><a href="http://www.w3schools.com/html5/html5_ref_eventattributes.asp">Atributos de eventos</a></li>
</ul>
<h3>18. Cuando debemos usar DIV&#8217;S ?</h3>
<p>Habiendo tantos elementos nuevos en HTML5 nos preguntamos si debemos seguir usando los div para organizar nuestra web. La respuesta es si, siempre y cuando no haya un elemento que lo defina mejor semánticamente. Esto quiere decir que por ejemplo si escribimos un artículo usariamos &lt;article&gt; para agrupar el código,  en cambio si nuestro propósito es simplemente posicionar dicha porción de código un div sería la elección perfecta.</p>
<h3>19. Guardando datos de forma local (localStorage y sessionStorage)</h3>
<p>Esto aunque en un día fue considerado HTML5 ha pasado a ser una especificación independiente.</p>
<p>HTML5 ofrece dos posibilidades para almacenar datos en el lado del cliente:</p>
<ul>
<li><strong>localStorage </strong>Almacena datos sin tiempo limite</li>
<li><strong>sessionStorage </strong>Almacena datos por lo que dure la sesión</li>
</ul>
<p>Estas opciones vienen a ser el reemplazo de las famosas <strong>COOKIES</strong> . A diferencias de estas los datos en HTML5 <strong>no son pasados</strong> en cada request ,sino solamente cuando se solicita, permitiendo así  almacenar grandes cantidades de datos mejorando el rendimiento general.</p>
<p>HTML5 utiliza javascript para acceder y grabar datos locales</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="javascript" style="font-family:monospace;"><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>
&nbsp;
localStorage.<span style="color: #660066;">nombre</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Juan&quot;</span><span style="color: #339933;">;</span>
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Tu nombre: &quot;</span> <span style="color: #339933;">+</span> localStorage.<span style="color: #660066;">nombre</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Contador de visitar con localStorage</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>localStorage.<span style="color: #660066;">pagecount</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
  localStorage.<span style="color: #660066;">pagecount</span><span style="color: #339933;">=</span>Number<span style="color: #009900;">&#40;</span>localStorage.<span style="color: #660066;">pagecount</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span>
  <span style="color: #009900;">&#123;</span>
  localStorage.<span style="color: #660066;">pagecount</span><span style="color: #339933;">=</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Visitas &quot;</span><span style="color: #339933;">+</span> localStorage.<span style="color: #660066;">pagecount</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;veces.&quot;</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></pre></td></tr></table></div>

<h3>20. Otras especificaciones independientes de HTML5</h3>
<p>Existen otras especificaciones que un principio formaron parte de HTML5 pero bien por ser muy complejas o extensas pasaron a ser especificaciones independientes. Entre ellas se encuentran:</p>
<ul>
<li><a href="http://dev.w3.org/html5/websockets/">WebSocket API</a></li>
<li><a href="http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol">WebSocket     protocol</a></li>
<li><a href="http://dev.w3.org/html5/eventsource/">Server-Sent Events</a></li>
<li><a href="http://dev.w3.org/html5/webstorage/">Web Storage</a> (localStorage y sessionStorage)</li>
<li><a href="http://dev.w3.org/html5/webdatabase/">Web SQL Database</a></li>
</ul>
<p>Con esto doy concluido esta segunda parte acerca de las nuevas características de HTML5. En el próximo y ultimo artículo voy a hablarles de <strong>&lt;canvas&gt;</strong> y como utilizarlo. Un saludo a tod@s!!</p>
<p>Via | <a href="http://net.tutsplus.com/tutorials/html-css-techniques/25-html5-features-tips-and-techniques-you-must-know/">Nettuts+</a> <a href="http://www.w3schools.com">W3schools</a> <a href="http://www.w3.org">W3.org</a></p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/_YS7EYme7a0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-de-html5-parte-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-de-html5-parte-ii/</feedburner:origLink></item>
		<item>
		<title>Las mejores nuevas características y técnicas de HTML5 – Parte I</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/QH3UxevZPQ4/</link>
		<comments>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-parte-i/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 21:16:46 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Recursos]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=453</guid>
		<description><![CDATA[Hace un tiempo por twitter me llego un link de Nettuts+ con algunas nuevas técnicas y características de HTML5 A continuación les dejo las que me parecieron más interesantes y útiles ,incluso había alguna que ni yo conocía. Estan ordenadas por mi sin ningún criterio y también agregue o junte alguna que otra característica. 1. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Flas-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-parte-i%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Flas-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-parte-i%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Hace un tiempo por <a href="http://twitter.com/chifliiiii">twitter</a> me llego un link de <a href="http://net.tutsplus.com/tutorials/html-css-techniques/25-html5-features-tips-and-techniques-you-must-know/">Nettuts+</a> con algunas nuevas técnicas y características de  <strong>HTML5 </strong></p>
<p>A continuación les dejo las que me parecieron más interesantes y útiles ,incluso había alguna que ni yo conocía. Estan ordenadas <del datetime="2010-08-29T20:22:18+00:00">por mi</del> sin ningún criterio y también agregue o junte alguna que otra característica.<br />
<span id="more-453"></span></p>
<h3>1. Nuevo DOCTYPE</h3>
<p>Hasta ahora se venía usando el engorroso <strong>DOCTYPE</strong> de toda la vida que yo si mi editor HTML no lo pusiera cada vez que abro una nueva página me sería imposible recordar.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span>
<span style="color: #00bbdd;">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span></pre></td></tr></table></div>

<p>Bueno a partir de ahora creo que va a ser un poco más fácil no?</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: #00bbdd;">&lt;!DOCTYPE html&gt;</span></pre></td></tr></table></div>

<h3>2. No más TYPE para scripts y links</h3>
<p>Reconozco que al día de la fecha sigo usando <strong>type </strong>para mis <strong>links </strong>y <strong>scripts tags</strong> como siempre se uso.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;script.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<p>Pero a partir de ahora voy a cambiar el modo de enlazar mis scripts y hojas de estilo.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet.css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;script.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<h3>3. No más comillas ni cerrar elementos</h3>
<p>A diferencia de <strong>XHTML </strong>en <strong>HTML5</strong> ya no es necesario usar comillas para los atributos, y ni siquiera es necesario cerrar los elementos. En esta coincido con el autor original de este artículo, no se si por costumbre o prolijidad me siento mejor haciéndolo al viejo estilo.</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;">p</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span>cualquierID&gt;</span> Hola que tal.</pre></td></tr></table></div>

<h3>4. &lt;figure&gt; , nuevo elemento de HTML5</h3>
<p>Con &lt;figure&gt; podemos ordenar semánticamente mejor una imagen a un pie de imagen uniendo ambos elementos dentro de uno mismo.</p>
<p>Por lo que una imagen como esta</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/marte.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Imagen de Marte&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Imagen de Marte. <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></td></tr></table></div>

<p>Quedaría de la siguiente forma:</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="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;figure&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/marte.jpg&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Imagen de Marte&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;figcaption&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Imagen de Marte. <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: #66cc66;">/</span>figcaption&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>figure&gt;</span></pre></td></tr></table></div>

<h3>5. Text inputs para emails</h3>
<p>Dentro de poco la mayoría de navegadores va a venir con validación de formularios incorporado por lo que agregando el nuevo <strong>type</strong> de email , crearemos input texts que solo permitan direcciones de email válidas</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;input <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></td></tr></table></div>

<h3>6. Los nuevos atributos &#8220;required&#8221; y &#8220;autofocus&#8221;</h3>
<p>Además de la validación si añadimos el atributo <strong>&#8220;required&#8221;</strong> no podremos enviar un formulario hasta no añadir la dirección de email en dicho campo.</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;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> required&gt;</span></pre></td></tr></table></div>

<p>O se puede usar :</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;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> required<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;required&quot;</span><span style="color: #66cc66;">/</span>&gt;</span></pre></td></tr></table></div>

<p>Por otro lado el atributo <strong>&#8220;autofocus&#8221;</strong> es otra solución más que nos evita usar javascript en nuestros formularios y al igual que el atributo anterior se usa de la siguiente forma.</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;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> required autofocus&gt;</span></pre></td></tr></table></div>

<h3>7. Placeholders o marcas de agua</h3>
<p>Los placeholders o marcas de agua son el texto que aparece en las cajas de búsqueda que al escribir o hacer focus desaparece. De momento esto se podía <a href="http://blog.timersys.com/recursos/7-codigos-jquery-que-todos-deberian-tener/">hacer con javascript</a> , pero ahora simplemente añadiendo este nuevo atributo conseguimos el mismo resultado.</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;input <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> placeholder<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;info@tuweb.com&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></td></tr></table></div>

<h3>8. Nueva semántica de &lt;header&gt; &lt;nav&gt; y &lt;footer&gt;</h3>
<p>A la hora de ordenar la web yo utilizo DIVs y les asigno atributos tales como:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</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;header&quot;</span>&gt;</span>
<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;nav&quot;</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</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>
<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: #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;footer&quot;</span>&gt;</span>
...
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>A partir de ahora HTML5 incorpora nueva semántica para estas partes de la página quedando de la siguiente manera:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;header&gt;</span>
<span style="color: #009900;">&lt;nav&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>nav&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>header&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;footer&gt;</span>
...
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>footer&gt;</span></pre></td></tr></table></div>

<h3>9. Internet Explorer y HTML5</h3>
<p>Para variar internet explorer es un mundo aparte en respecto a todos los navegadores , y la única forma que reconozca los elementos de HTML5 es haciéndoselo saber. Para ello Remy Sharp creo un <a href="http://remysharp.com/2009/01/07/html5-enabling-script/">script</a> que inicializa todos los elementos en IE</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE]&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre></td></tr></table></div>

<h3>10. Contenido editable</h3>
<p>Los nuevos navegadores soportan un nuevo atributo que puede ser aplicado a los elementos para permitir editar el texto en ellos. Como bien dicen en nettuts esto sumado a por ejemplo la posibilidad de guardas datos localmente te permite crear simples programas como por ejemplo una lista de Tareas</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">charset</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;utf-8&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>untitled<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h2</span>&gt;</span> To-Do List <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h2</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> contenteditable<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;true&quot;</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span> Break mechanical cab driver. <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span> Drive to abandoned factory
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span> Watch video of self <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	 <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<div id="attachment_492" class="wp-caption aligncenter" style="width: 264px"><a href="http://blog.timersys.com/wp-content/uploads/2010/08/contenteditable.png"><img class="size-full wp-image-492" title="contenteditable" src="http://blog.timersys.com/wp-content/uploads/2010/08/contenteditable.png" alt="to do list" width="254" height="149" /></a><p class="wp-caption-text">imagen de nettuts</p></div>
<p>Mañana si me queda algo de tiempo cuelgo la segunda parte. Un saludo y comenten cual les parece más interesante.</p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/QH3UxevZPQ4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-parte-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/recursos/las-mejores-nuevas-caracteristicas-y-tecnicas-de-html5-parte-i/</feedburner:origLink></item>
		<item>
		<title>Actualizar Twitter a traves de PHP y OAuth</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/zTAJP588yi4/</link>
		<comments>http://blog.timersys.com/tutoriales/actualizar-twitter-a-traves-de-php-y-oauth/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 01:12:46 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=478</guid>
		<description><![CDATA[Hasta hace poco Twitter permitía la actualización de status a través de un método sencillo mandando usuario , contraseña y mensaje de una sola vez a través de una sencilla función. Hoy en día esto ya no es así y el único modo de interactuar con la API de Twitter es usando OAuth El método [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Ftutoriales%2Factualizar-twitter-a-traves-de-php-y-oauth%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Ftutoriales%2Factualizar-twitter-a-traves-de-php-y-oauth%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Hasta hace poco <a href="http://twitter.com">Twitter</a> permitía la actualización de status a través de un método sencillo mandando usuario , contraseña y mensaje de una sola vez a través de una sencilla función. Hoy en día esto ya no es así y el único modo de interactuar con la <a href="http://dev.twitter.com/">API</a> de Twitter es usando <a href="http://dev.twitter.com/pages/oauth_faq">OAuth</a><br />
<span id="more-478"></span><br />
El método antiguo:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> postToTwitter<span style="color: #009900;">&#40;</span><span style="color: #000088;">$mensaje</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000088;">$host</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://twitter.com/statuses/update.xml?status=&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mensaje</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$host</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_VERBOSE<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_USERPWD<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Usuario:password&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HTTP_VERSION<span style="color: #339933;">,</span> CURL_HTTP_VERSION_1_1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Look at the returned header</span>
    <span style="color: #000088;">$resultArray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_getinfo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resultArray</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'http_code'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;200&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$twitter_status</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'Tu mensaje se envio!'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$twitter_status</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Error &quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$twitter_status</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>A partir de ahora tenemos que usar OAuth para que nuestros usuarios se autentifiquen de forma segura en Twitter o mejor dicho en nuestra aplicación de Twitter.<br />
Pero que pasa cuando no necesitamos que usuarios interactuen con Twitter sino más bien lo único que queremos es actualizar nuestro <a href="http://twitter.com/chifliiiii">propio Twitter</a> por ejemplo con los nuevos artículos de nuestro blog. En este caso OAuth resultaría muy tedioso ya que no necesitamos autentificarnos cada vez que queremos publicar un nuevo twitter, si no más bien obtener un <strong>ACCESS_TOKEN</strong> que no expire y nos sirva para siempre.</p>
<h3>Usar Twitter OAuth + PHP para actualizar tu status</h3>
<p>Lo primero que necesitamos es crear una aplicación en <a href="http://dev.twitter.com/apps">Twitter Apps</a> . Al crear la aplicación debemos asegurarnos de elegir <strong>Client</strong> y de dar permisos <strong>Read &amp; Write</strong> (lectura y escritura). Los demás campos no son importantes ya que no usaremos esta aplicación con usuarios. Una vez creada la aplicación obtendremos el <strong>Consumer Key </strong>y <strong>Consumer Secret</strong> .El <strong>access token</strong> (oauth_token) lo podemos ver si hacemos click en <strong>My Access Token</strong></p>
<p>Lo segundo es bajar la librería <a href="http://github.com/abraham/twitteroauth">twitteroauth</a> de <a href="http://github.com/abraham">Abraham</a> y subir a tu servidor los archivos <strong>OAuth.php</strong> y <strong>twitteroauth.php</strong></p>
<p>Por último en tu archivo PHP debes incluir las siguientes funciones:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'twitteroauth.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//incluir la librería</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_CONSUMER_KEY'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'tuConsumerKey'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//La obtenes en el paso 1</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_CONSUMER_SECRET'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'tuConsumerSecret'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//La obtenes en el paso 1</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_OAUTH_TOKEN'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'tuOAuthToken'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//La obtenes en el paso 1</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_OAUTH_TOKEN_SECRET'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'tuOAuthTokenSecret'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//La obtenes en el paso 1</span>
&nbsp;
		<span style="color: #000088;">$bit</span><span style="color: #339933;">=</span>tinyurl<span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//reducimos el link con la api de bit.ly</span>
		<span style="color: #000088;">$quedan</span><span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">140</span><span style="color: #339933;">-</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bit</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// calculo los caracteres restantes que me quedan para publicar</span>
                                                                     restando los puntos suspensivo
		<span style="color: #000088;">$mensaje</span><span style="color: #339933;">=</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mensaje</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$quedan</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' ...'</span><span style="color: #339933;">.</span><span style="color: #000088;">$bit</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// corto el mensaje en caso de que sea muy largo</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//declaramos la función que realiza la conexión a tu aplicación de twitter</span>
		<span style="color: #000000; font-weight: bold;">function</span> getConnectionWithAccessToken<span style="color: #009900;">&#40;</span><span style="color: #000088;">$oauth_token</span><span style="color: #339933;">,</span> <span style="color: #000088;">$oauth_token_secret</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                     <span style="color: #000088;">$connection</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TwitterOAuth<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'_CONSUMER_KEY'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'_CONSUMER_SECRET'</span><span style="color: #339933;">,</span><span style="color: #000088;">$oauth_token</span><span style="color: #339933;">,</span> <span style="color: #000088;">$oauth_token_secret</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                   <span style="color: #b1b100;">return</span> <span style="color: #000088;">$connection</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
<span style="color: #666666; font-style: italic;">//Realizamos la conexión</span>
<span style="color: #000088;">$connection</span> <span style="color: #339933;">=</span> getConnectionWithAccessToken<span style="color: #009900;">&#40;</span>_OAUTH_TOKEN<span style="color: #339933;">,</span> _OAUTH_TOKEN_SECRET<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//Publicamos el mensaje en twitter</span>
<span style="color: #000088;">$twitter</span><span style="color: #339933;">=</span><span style="color: #000088;">$connection</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>post<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'statuses/update'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'status'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span><span style="color: #000088;">$mensaje</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Función para acortar URL con bit.ly . Primero debemos registrarnos en http://bit.ly para obtener clave api y usuario</span>
 <span style="color: #000000; font-weight: bold;">function</span> tinyurl<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url_larga</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$tiny</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://api.bit.ly/v3/shorten?login=TuUsuario&amp;amp;apiKey=tuClaveApi&amp;amp;format=txt&amp;amp;longUrl=&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$url_larga</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sesion</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$sesion</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$tiny</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_setopt</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$sesion</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$url_tiny</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$sesion</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$sesion</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url_tiny</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Resumiendo:</p>
<ul>
<li>Creamos aplicación en <a href="http://dev.twitter.com/apps">Twitter Apps</a></li>
<li>Elegimos <strong>Client</strong> como Application type y le damos permisos de <strong>Read &amp; Write</strong></li>
<li>Obtenemos <strong>Consumer Key</strong> , <strong>Consumer Secret </strong>, <strong>Access Token</strong>(OAuth access token) y <strong>Access Token Secret</strong>(Oauth token secret)</li>
<li>Descargamos la librería <strong>twitteroauth.php</strong> y <strong>oauth.php</strong> desde <a href="http://github.com/abraham/twitteroauth/tree/master/twitteroauth/">aquí</a> y los subimos al server</li>
<li>Por último creamos el mensaje y la url corta para actualizar nuestro estado.</li>
</ul>
<p>Espero que hayan entendido bien el tutorial porque la verdad lo hice corriendo y con la comida en el horno xD . Cualquier duda dejen sus comentarios. Saludos!!</p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/zTAJP588yi4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/tutoriales/actualizar-twitter-a-traves-de-php-y-oauth/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/tutoriales/actualizar-twitter-a-traves-de-php-y-oauth/</feedburner:origLink></item>
		<item>
		<title>60+ Generadores de sitemaps compatibles con google</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/4p3wCHSBQ2A/</link>
		<comments>http://blog.timersys.com/recursos/60-generadores-de-sitemaps-compatibles-con-google/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 16:45:15 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Recursos]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[sitemaps]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=459</guid>
		<description><![CDATA[Ando metido en un proyecto nuevo  que contiene muchas páginas generadas dinámicamente como para realizar un sitemap de forma manual , así que me puse a buscar algún generador de sitemap que utilize el protocolo establecido para sitemaps tal y como indica en sitemaps.org. Después de buscar por un buen rato me encontré con un [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2F60-generadores-de-sitemaps-compatibles-con-google%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2F60-generadores-de-sitemaps-compatibles-con-google%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Ando metido en un proyecto nuevo  que contiene muchas páginas generadas dinámicamente como para realizar un sitemap de forma manual , así que me puse a buscar algún <strong>generador de sitemap</strong> que utilize el protocolo establecido para sitemaps tal y como indica en <a href="http://sitemaps.org/">sitemaps.org.</a></p>
<p>Después de buscar por un buen rato me encontré con un listado muy completo de <a href="http://code.google.com/p/sitemap-generators/wiki/SitemapGenerators">generadores de sitemap</a> que comparto con ustedes a continuación.</p>
<p><span id="more-459"></span></p>
<h2>Programas para instalar en el server</h2>
<ul>
<li><a rel="nofollow" href="http://enarion.net/google/">Enarion phpSitemapsNG</a> (PHP)</li>
<li><a rel="nofollow" href="http://code.google.com/p/googlesitemapgenerator/">Google Sitemap Generator</a> (Linux/Windows, 32/64bit, open-source)</li>
<li><a rel="nofollow" href="http://www.orvinfait.fr/generateur_sitmap_version.html">Outil en PHP</a> (French, PHP)</li>
<li><a rel="nofollow" href="http://code.google.com/p/perlsitemapgenerator/">Perl Sitemap Generator</a> (Perl)</li>
<li><a rel="nofollow" href="http://code.google.com/p/sitemap-generators/">Python Sitemap Generator</a> (Python)</li>
<li><a rel="nofollow" href="http://www.smart-it-consulting.com/article.htm?node=154&amp;amp;page=82">Simple Sitemaps</a> (PHP)</li>
<li><a rel="nofollow" href="http://www.softswot.com/sitemapinfo.php">SiteMap XML Dynamic Sitemap Generator</a> (PHP) $</li>
<li><a rel="nofollow" href="http://www.xml-sitemaps.com/standalone-google-sitemap-generator.html">XML Sitemap Generator</a> (PHP) $</li>
</ul>
<h2>Sitemaps generators/plugins para CMS</h2>
<ul>
<li><a rel="nofollow" href="http://james.newtonking.com/projects/sitemaps-net.aspx">ASP.NET &#8211; Sitemaps.Net</a></li>
<li><a rel="nofollow" href="http://armonia.spiral-static.org/?2005/06/14/50-generador-de-sitemaps-para-dotclear">DotClear</a> (Spanish)</li>
<li><a rel="nofollow" href="http://coudert.free.fr/blog//index.php?2005/06/24/102-sitemap-for-dotclear">DotClear (2)</a></li>
<li><a rel="nofollow" href="http://drupal.org/project/xmlsitemap">Drupal</a></li>
<li><a rel="nofollow" href="http://www.pc4people.com/products.php?cat=57">ECommerce Templates (PHP)</a> $</li>
<li><a rel="nofollow" href="http://www.webtressdesign.com/proddetail.asp?prod=gsm101">Ecommerce Templates (PHP or ASP)</a> $</li>
<li><a rel="nofollow" href="http://wiki.lifetype.net/index.php/PLog_1.0/Plugins/sitemap">LifeType</a></li>
<li><a rel="nofollow" href="http://www.mediawiki.org/wiki/Manual:GenerateSitemap.php">MediaWiki Sitemap generator</a></li>
<li><a rel="nofollow" href="http://sourceforge.net/projects/ms2sm">mnoGoSearch</a></li>
<li><a rel="nofollow" href="http://www.oscommerce.com/community/contributions,3226">OS Commerce</a></li>
<li><a rel="nofollow" href="http://www.kiesler.at/article232.html">phpWebSite</a></li>
<li><a rel="nofollow" href="http://plone.org/products/qplonegooglesitemaps">Plone</a></li>
<li><a rel="nofollow" href="http://loghound.com/Sitemap/index.php">RapidWeaver</a></li>
<li><a rel="nofollow" href="http://forum.textpattern.com/viewtopic.php?id=27212">Textpattern</a></li>
<li><a rel="nofollow" href="http://www.vbseo.com/f44/vbseo-google-yahoo-sitemap-generator-vbulletin-3-5-x-vbulletin-3-0-x-2648/">vBulletin</a></li>
<li><a rel="nofollow" href="http://wikkawiki.org/GoogleSitemapHandler">Wikka Wiki</a> (PHP)</li>
<li><a rel="nofollow" href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/">WordPress</a></li>
</ul>
<h2>Herramientas descargables</h2>
<ul>
<li><a rel="nofollow" href="http://www.expressionextras.com/toolbar/sitemap_builder.htm">Expression Web Sitemap Builder</a> (Windows) $</li>
<li><a rel="nofollow" href="http://gsitecrawler.com/">GSiteCrawler</a> (Windows)</li>
<li><a rel="nofollow" href="http://trytobreak.com/">GWebCrawler &amp; Sitemap Creator</a> (Windows)</li>
<li><a rel="nofollow" href="http://www.dbnetsolutions.co.uk/gmapper/">G-Mapper</a> (Windows)</li>
<li><a rel="nofollow" href="http://www.inspyder.com/products/SitemapCreator/">Inspyder Sitemap Creator</a> (Windows) $</li>
<li><a rel="nofollow" href="http://www.intelli-mapper.com/">IntelliMapper</a> (Windows) $</li>
<li><a rel="nofollow" href="http://www.brianpautsch.com/ShowItem25.aspx">KeyLimeTie Sitemap Generator</a> (Windows) $</li>
<li><a rel="nofollow" href="http://www.micro-sys.dk/products/sitemap-generator/">Microsys A1 Sitemap Generator</a> (Windows) $</li>
<li><a rel="nofollow" href="http://www.ragesw.com/products/googlesitemap.html">Rage Google Sitemap Automator</a> $ (OS-X)</li>
<li><a rel="nofollow" href="http://www.sitemappro.com/">Site Map Pro</a> (Windows) $</li>
<li><a rel="nofollow" href="http://www.sitemapwriter.com/">Sitemap Writer</a> (Windows) $</li>
<li><a rel="nofollow" href="http://devintelligence.com/sitemapgenerator/">Sitemap Generator by DevIntelligence</a> (Windows)</li>
<li><a rel="nofollow" href="http://www.coffeecup.com/google-sitemapper/">Sitemapper by CoffeeCup</a> (Windows) $</li>
<li><a rel="nofollow" href="http://www.sorrowman.org/sitemap-tools/">Sorrowmans Sitemap Tools</a> (Windows)</li>
<li><a rel="nofollow" href="http://www.thesitemapper.com/">TheSiteMapper</a> (Windows) $</li>
<li><a rel="nofollow" href="http://www.vigos.com/products/gsitemap/">Vigos Gsitemap</a> (Windows)</li>
<li><a rel="nofollow" href="http://www.webdesignpros.ca/software/sitemapGenerator.html">WebDesignPros Sitemap Generator</a> (Java Webstart Application)</li>
<li><a rel="nofollow" href="http://wonderwebware.com/sitemap-generator/">WonderWebWare Sitemap Generator</a> (Windows)</li>
</ul>
<h2>Generadores online</h2>
<ul>
<li><a rel="nofollow" href="http://www.auditmypc.com/free-sitemap-generator.asp">AuditMyPc.com Sitemap Generator</a></li>
<li><a rel="nofollow" href="http://www.automapit.com/googlesitemaps.html">AutoMapIt</a></li>
<li><a rel="nofollow" href="http://www.autositemap.com/">Autositemap</a> $</li>
<li><a rel="nofollow" href="http://enarion.net/google/phpsitemapng/crawler/">Enarion phpSitemapsNG</a></li>
<li><a rel="nofollow" href="http://www.freesitemapgenerator.com/">Free Sitemap Generator</a></li>
<li><a rel="nofollow" href="http://www.neuroticweb.com/recursos/sitemap/">Neuroticweb.com Sitemap Generator</a></li>
<li><a rel="nofollow" href="http://www.resourceseo.com/sitemaps.php">ResourceSEO Online Sitemap Generator</a></li>
<li><a rel="nofollow" href="http://www.addme.com/ror-sitemap-generator.htm">ROR Sitemap Generator</a></li>
<li><a rel="nofollow" href="http://www.scriptsocket.com/sitemaps.php">ScriptSocket Sitemap Generator </a></li>
<li><a rel="nofollow" href="http://www.seoutility.com/it/tools/google/sitemap_generator.aspx">SeoUtility Sitemap Generator</a> (Italian)</li>
<li><a rel="nofollow" href="http://www.sitemapdoc.com/">SitemapDoc</a></li>
<li><a rel="nofollow" href="http://www.sitemapspal.com/">Sitemapspal</a></li>
<li><a rel="nofollow" href="http://www.sitemapsubmit.net/generate-sitemap">SitemapSubmit</a></li>
<li><a rel="nofollow" href="http://www.smart-it-consulting.com/internet/google/submit-validate-sitemap/">Smart-IT-Consulting Google Sitemaps XML Validator</a></li>
<li><a rel="nofollow" href="http://www.xml-sitemaps.com/">XML-Sitemaps Generator</a></li>
<li><a href="http://www.attracta.com/">Attracta SEO Tools</a></li>
</ul>
<h2>CMS con generador de sitemap integrado</h2>
<ul>
<li><a rel="nofollow" href="http://www.concrete5.org/">Concrete5</a></li>
</ul>
<h2>Generador de sitemaps de Google News</h2>
<ul>
<li><a rel="nofollow" href="http://wordpress.org/extend/plugins/gn-xml-sitemap/">WordPress Google News plugin</a></li>
</ul>
<h2>Códigos fuentes y librerías</h2>
<ul>
<li><a rel="nofollow" href="http://www.iteam5.net/francesco/sitemap_gen/">ASP script</a></li>
<li><a rel="nofollow" href="http://xahlee.org/emacs/make_sitemap.html">Emacs Lisp script</a></li>
<li><a rel="nofollow" href="http://code.google.com/p/sitemapgen4j/">Java library</a></li>
<li><a rel="nofollow" href="http://groups.google.com/group/google-sitemaps/browse_thread/thread/83b34a59a05a104d/">Perl script</a></li>
<li><a rel="nofollow" href="http://www.phpclasses.org/browse/package/2612.html">PHP class</a></li>
<li><a rel="nofollow" href="http://www.bin-co.com/php/programs/tools/sitemap_generator/">PHP generator script</a></li>
</ul>
<p>Hay bastantes ofertas como para mantenerse ocupado un tiempo. Yo estoy probando de momento <a href="http://www.attracta.com/">Attracta SEO Tools</a> que es un servicio online que viene integrado en mi <a href="http://blog.timersys.com/recursos/posiblemente-el-mejor-hosting-de-todos/">cPanel</a> y de momento funciona muy bién. Aunque tengo ganas de instalar alguno que otro en mi server para ver como funcionan. Si alguien tiene algún otro que no aparezca en la lista deje el comentario y lo iremos agregando. Saludos!!!</p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/4p3wCHSBQ2A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/recursos/60-generadores-de-sitemaps-compatibles-con-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/recursos/60-generadores-de-sitemaps-compatibles-con-google/</feedburner:origLink></item>
		<item>
		<title>Los mejores blogs de programación y diseño web</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/2KeZllS1UkE/</link>
		<comments>http://blog.timersys.com/recursos/los-mejores-blogs-de-programacion-y-diseno-web/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 00:19:41 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Recursos]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[diseño web]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=455</guid>
		<description><![CDATA[Hoy cuando me levante se me ocurrió hacer una lista con los mejores blogs  o webs sobre diseño web , programación , maquetación css, javascript  y frameworks, etc .  Como esto de &#8220;los mejores blogs&#8221; es muy amplio y según  el parecer de cada uno la lista va a ser totalmente diferente me parece mejor [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Flos-mejores-blogs-de-programacion-y-diseno-web%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Flos-mejores-blogs-de-programacion-y-diseno-web%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Hoy cuando me levante se me ocurrió hacer una lista con los mejores blogs  o webs sobre diseño web , programación , maquetación css, javascript  y frameworks, etc .  Como esto de &#8220;los mejores blogs&#8221; es muy amplio y según  el parecer de cada uno la lista va a ser totalmente diferente me parece mejor hacer directamente una <strong>lista abierta</strong> donde cada uno pueda agregar la web que le parezca. Así que si conoces alguna web interesante o querés presentar la tuya deja un comentario con el link .</p>
<p>Otra cosa que pensé es dividirlos en categorías pero como la mayoría  ocupan varias categorías es mejor que cada uno ponga al lado los principales temas  que se tratan y simplemente los dividimos en 2 grandes grupos. Páginas en <strong>Ingles</strong> y en <strong>Español</strong></p>
<h3>Español</h3>
<p><a href="http://blog.timersys.com">Timersys</a> &lt;&#8212;- JQuery ,PHP , tutoriales , recursos y mucho más @<a href="http://twitter.com/chifliiiii">Damian Logghe</a></p>
<p><a href="http://www.anieto2k.com/">Anieto2K</a> &lt;&#8212;- Desarollo web, wordpress, fotografía ,etc @<a href="http://twitter.com/aNieto2k">Andres Nieto</a></p>
<p><a href="http://www.cssblog.es/">CSSBlog Es</a> &lt;&#8212;- CSS 100% y monton de recursos @<a href="http://twitter.com/cssblog_es">Pedro Corchero Murga</a></p>
<p><a href="http://www.forosdelweb.com/">Foros del web</a> &lt;&#8212;- Impresionante comunidad con miles de miembros activos dispuestos a ayudarte @<a href="http://twitter.com/forosdelweb">Forosdelweb</a></p>
<p><a href="http://www.librosweb.es/">LibrosWeb</a> &lt;&#8212;- Manuales completamente gratis de programación y diseño web.</p>
<p><a href="http://www.todotutorialesweb.com/">Todo Tutoriales Web</a> &lt;&#8212;- Recursos y trucos para foroactivo, diseño, etc @<a href="http://twitter.com/BourneTTW">Carlos</a></p>
<h3>Ingles</h3>
<p><a href="http://woorkup.com/">WoorkUp</a> &lt;&#8212;- Recursos , tutoriales y artículos muy buenos @<a href="http://twitter.com/woork">Antonio Lupetti</a></p>
<p><a href="http://www.smashingmagazine.com/">Smashing Magazine</a> &lt;&#8212;- Excelente web con miles de recursos gráficos @<a href="http://twitter.com/smashingmag">Smashing Mag</a></p>
<p><a href="http://net.tutsplus.com/">Nettuts+</a> &lt;&#8212;- Página super completa con tutoriales y ejemplos de todos @<a href="http://twitter.com/nettuts">nettuts</a></p>
<p>Ahora por favor colaboren que entre todos podemos hacer una buena lista. Saludos!!</p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/2KeZllS1UkE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/recursos/los-mejores-blogs-de-programacion-y-diseno-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/recursos/los-mejores-blogs-de-programacion-y-diseno-web/</feedburner:origLink></item>
		<item>
		<title>Como mejorar la velocidad de carga de tu página web</title>
		<link>http://feedproxy.google.com/~r/Timersys/~3/Ii-jTWjdtf0/</link>
		<comments>http://blog.timersys.com/recursos/como-mejorar-velocidad-carga-pagina-web/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 01:18:42 +0000</pubDate>
		<dc:creator>Damian</dc:creator>
				<category><![CDATA[Recursos]]></category>
		<category><![CDATA[Tutoriales]]></category>
		<category><![CDATA[diseño web]]></category>

		<guid isPermaLink="false">http://blog.timersys.com/?p=447</guid>
		<description><![CDATA[Hoy en día los buscadores están empezando a puntuar la velocidad de carga de las páginas webs para mostrar los diferentes resultados ( engrosando así sus algoritmos para mejorar la experiencia de los usuarios). Hay diversidad de formas de acelerar la carga de una página web pero podemos resumirlas en unas cuantas. 1. Buen diseño [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Fcomo-mejorar-velocidad-carga-pagina-web%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.timersys.com%2Frecursos%2Fcomo-mejorar-velocidad-carga-pagina-web%2F&amp;source=chifliiiii&amp;style=normal&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
<p>Hoy en día los buscadores están empezando a puntuar la velocidad de carga de las páginas webs para mostrar los diferentes resultados ( engrosando así sus algoritmos para mejorar la experiencia de los usuarios). Hay diversidad de formas de acelerar la carga de una página web pero podemos resumirlas en unas cuantas.</p>
<p><span id="more-447"></span></p>
<h3>1. <a href="http://blog.timersys.com/tag/diseno-web/"><strong>Buen diseño de código</strong></a>.</h3>
<h3>2. <a href="http://blog.timersys.com/tag/base-de-datos/"><strong>Buen diseño de base de datos. </strong></a></h3>
<p>En estos dos primeros puntos no les puedo ayudar más que ofreciendo <a href="http://blog.timersys.com/category/tutoriales/">tutoriales</a> y <a href="http://blog.timersys.com/category/recursos/">recursos</a> en mi blog.</p>
<p>Pero además de esto existen varios factores importantes que podemos mejorar. Una de las herramientas que más me gusta es <a href="http://developer.yahoo.com/yslow/">YSlow</a>, un complemento de Yahoo para el archiconocido addon de Firefox llamada <a href="https://addons.mozilla.org/es-ES/firefox/addon/1843/">Firebug</a>.</p>
<p>Esta herramienta nos va a mostrar los &#8220;puntos flacos&#8221; que tiene nuestra web y la forma de mejorarlos.</p>
<p>El más importante en mi punto de vista es la compresión de todos los archivos. Con esto podemos reducir el tamaño de la web ( archivos php, css, js, etc) en un 75%-90% reduciendo la velocidad de descarga de la misma en el mismo porcentaje.</p>
<h3>3.El método más comúnmente usado y eficaz es <a href="http://www.gzip.org/">Gzip</a>.</h3>
<p>A continuación les voy a explicar como habilitarlo para php aunque también se puede <a href="http://articles.sitepoint.com/article/web-output-mod_gzip-apache">habilitar desde apache</a> si tienen privilegios.</p>
<p>Existen 3 métodos para habilitar zlib :</p>
<ol>
<li><strong>Añadir en el <em>.htaccess</em> </strong>:<br />
<em>php_flag zlib.output_compression On</em></li>
<li><strong>Añadir en php.ini</strong>:<br />
<em>zlib.output_compression = On</em></li>
<li><strong>Añadir en cada script PHP <em> </em>antes de cualquier ouput</strong>:<br />
<em>ini_set(‘zlib_output_compression’,&#8217;On’);</em></li>
</ol>
<p>Una vez realizado cualquier de estos métodos todo archivo PHP pasara comprimido o Gzipped al usuario.</p>
<p><strong>Que pasa si queremos comprimir otros archivos como javascript o css con Gzip?</strong></p>
<p>Para ellos tenemos que cambiar la extensión de los archivos por php. Por ejemplo a script.js lo llamaríamos script.js.php y al principio del archivo añadiríamos la siguiente cabezera:</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>php <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-type: text/js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</p>
<p>Luego lo incluiríamos en nuestros script de forma habitual:</p>
<p><div class="codecolorer-container html4strict mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;script.js.php&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></div></div>
</p>
<p>Lo mismo sería para archivos <strong>CSS.</strong></p>
<p>Ahora bien hay hosting que no soportan este método. Por ejemplo en mi hosting compartido de <a href="http://blog.timersys.com/recursos/posiblemente-el-mejor-hosting-de-todos/">HostGator</a> no puedo utilizar ninguna de estas opciones sin embargo desde el Cpanel del mismo existe una opción que se llama <strong>Optimize Web</strong> que se encuentra en la parte de servicios. Al habilitar dicha opción todos los archivos serán comprimidos antes de su descarga mejorando así la experiencia del usuario.</p>
<p></p>
<h3>4.Añadir expires headers / cabezeras que expiren</h3>
<p>Nuestros navegadores<strong> </strong>guardan en cache absolutamente todos(imágenes, archivos css, js, etc). Por lo que si no ponemos una fecha de caducidad en las cabezeras cada vez que el usuario descargue nuestra web estará descargando todo una y otra vez.</p>
<p>Podemos hacerlo de forma sencilla modificando el .htaccess para que añada un expire header a los archivos solicitados:</p>
<p><div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;FilesMatch &quot;\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$&quot;&gt;&lt;br /&gt;<br />
Header set Expires &quot;Thu, 15 Apr 2020 20:00:00 GMT&quot;&lt;br /&gt;<br />
&lt;/FilesMatch&gt;</div></div>
</p>
<h3>5.Cantidad de requests HTTP</h3>
<p>Cada archivo, cada imagen que se carga es una descarga paralela o request http que hacemos al servidor. Por eso<strong> es conveniente juntar por ejemplo todos nuestros scripts js en un solo archivo y comprimirlos</strong> con <a href="http://jscompress.com/">minified</a>, o juntar cada imagen y utilizar <a href="http://alistapart.com/articles/sprites"><strong>CSS Sprites</strong></a> que aunque el tamaño de la imagen resultante puede ser igual , la cantidad de requests al servidor se verá reducida.</p>
<h3>6.Colocar las hojas de estilo al principio y los scripts de javascript al final.</h3>
<p>Esta comprobado que al colocar las hojas de estilo al principio de la página entre las estiquetas <head></head> hace que las páginas carguen más progresivamente dando una sensación de velocidad.</p>
<p>Igualmente cargas los archivos javascript al final de la página (siempre que sea posible) facilita que se descargue primero la parte visual de la web.</p>
<img src="http://feeds.feedburner.com/~r/Timersys/~4/Ii-jTWjdtf0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.timersys.com/recursos/como-mejorar-velocidad-carga-pagina-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.timersys.com/recursos/como-mejorar-velocidad-carga-pagina-web/</feedburner:origLink></item>
	</channel>
</rss><!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
