Subscribe to RSS feed Suscribirse al feed RSS or o follow me me siguen on Twitter? en Twitter?
Digg recently Digg recientemente introduced DiggBar presentó DiggBar to mixed reactions. a reacciones muy diversas. We also shared a Greasemonkey script to También compartimos un script para Greasemonkey remove DiggBar eliminar DiggBar , only to discover later that it can be , Sólo para descubrir más tarde que puede ser turned off from Digg preferences apagado de Digg preferencias de . . However, DiggBar is enabled by default, and most readers are unlikely to turn it off themselves. Sin embargo, DiggBar está activado por defecto, y la mayoría de los lectores es poco probable que apagarlo ellos mismos. Here is a JavaScript code to remove DiggBar – bloggers and webmasters who find DiggBar damaging would probably find this useful. Aquí hay un código JavaScript para eliminar DiggBar - bloggers y los webmasters que se encuentran DiggBar dañar probablemente encuentre útil.
Reasons to remove DiggBar Razones para quitar DiggBar
So, what is the damage? Entonces, ¿cuál es el daño? DiggBar does a 200 HTTP code (hence depriving sites of DiggBar hace un código HTTP 200 (por lo tanto, privar a los sitios de Google juice Jugo de Google ). ). If a hundred sites link to your blog using the Digg shortened URL, all that juice goes to Digg. Si un enlace de cien sitios a tu blog utilizando el Digg acortar URL, todos los que el jugo va a Digg.
Can rel=”canonical” be used to suggest a canonical url on a completely different domain? Puede rel = "canónica" se utiliza para sugerir una URL canónica de un dominio completamente diferente?
No. To migrate to a completely different domain, permanent (301) redirects are more appropriate. No. Para migrar a un dominio completamente diferente, permanente (301) redirecciones son más apropiados. Google currently will take canonicalization suggestions into account across subdomains (or within a domain), but not across domains. Actualmente, Google tendrá en cuenta las sugerencias de canonización a través de subdominios (o dentro de un dominio), pero no a través de dominios. So site owners can specify a canonical page on www.example.com from a set of pages on example.com or help.example.com, but not on example-widgets.com Así que los propietarios del sitio pueden especificar una página en www.example.com canónica de un conjunto de páginas en example.com o help.example.com, pero no por ejemplo-widgets.com
- -- About rel=canonical Acerca de rel = canónica , Google Webmasters help , Webmasters de asistencia de Google
Canonical tag which would not work (because canonical tags work only within a domain, not cross-domain). Etiquetas Canonical que no funcionaba (porque las etiquetas canónica sólo funcionan dentro de un dominio, no cross-domain).
How to remove DiggBar (code) ¿Cómo eliminar DiggBar (código)
Initially, this article contained only the JavaScript method, but upon further searching, I also found a PHP code. Inicialmente, este artículo sólo contenía el método de JavaScript, pero en otras búsquedas, también encontré un código PHP. Both methods are shown here, and each is useful for different scenarios. Ambos métodos se muestran aquí, y cada uno es útil para los diferentes escenarios.
Javascript code Código Javascript
The JavaScript method redirects the user to the actual page. El método JavaScript redirecciona al usuario a la página real. Enter this code block within head tags of your pages. Ingresa el siguiente bloque de código en las etiquetas la cabeza de sus páginas.
<script language="JavaScript" type="text/javascript"> language="JavaScript" <script type="text/javascript">
if (top.location != self.location) top.location.replace(self.location); if (top.location! = self.location) top.location.replace (self.location);
</script> </ script>
The above code removes all frames, including the frames created by Google Image search. El código anterior elimina todos los marcos, incluidos los marcos creados por la búsqueda de imágenes de Google. If you do not like image search visitors seeing the above code, use it always. Si no te gusta ver a los visitantes la búsqueda de imágenes del código anterior, utilice siempre. If you wish to remove DiggBar only, use it only when your blog is Dugg/about to be dugg. Si desea eliminar DiggBar sólo, sólo la utiliza cuando su blog es Dugg / a punto de ser Dugg. That way, you can have the best of both worlds – image search visitors see the frame on top while DiggBar is removed during the influx of visitors (which is when your visitors will link to you and bookmark you. De esta manera, usted puede tener lo mejor de ambos mundos - la búsqueda de imágenes visitantes ver el cuadro en la parte superior, mientras que DiggBar se quita durante la afluencia de visitantes (que es cuando los visitantes tienen enlaces a usted y marcador.
PHP code Código de PHP
John Gruber John Gruber posted a PHP snippet publicado un fragmento de código PHP that detects DiggBar (from the URL) and shows them a greeting message. que detecta DiggBar (de la URL) y muestra un mensaje de felicitación.
This PHP snippet merely shows a message to the visitor and stops loading the page – without redirecting the user. Este fragmento de código PHP sólo muestra un mensaje para el visitante y deja de cargar la página - sin redirigir al usuario. You may want to show a hyperlink to the actual page. Es posible que desee mostrar un hipervínculo a la página real.
<?php if (preg_match('#http://digg.com/\w{1,8}/?$#', <? php if (preg_match ( '# http://digg.com/ \ w (1,8 }/?$#',
$_SERVER['HTTP_REFERER']) ) { HTTP_REFERER $ _SERVER [ ''])) (
echo "<p>Special message for Digg users here.</p>"; echo "<p> mensaje especial para los usuarios de Digg aquí. </ p>";
exit; salida;
} )
?> ?>
The above code checks whether the referral URL is digg.com followed by 1 to 8 characters – which is typical of the DiggBar. Los controles de código anterior si la URL de referencia es digg.com seguido de 1 a 8 caracteres - que es típica de la DiggBar. If yes, it shows a message to the visitors (written within quotes on line 2) and stops loading page. En caso afirmativo, se muestra un mensaje a los visitantes (por escrito dentro de las comillas en la línea 2) y deja de cargar la página.
Related reading Lectura relacionada
- New and improved method to remove / block DiggBar Nuevo y mejorado método para eliminar / bloque DiggBar
- How to remove DiggBar (Greasemonkey script) ¿Cómo eliminar DiggBar (script de Greasemonkey)
- DiggBar Remover removes DiggBar the smart way DiggBar Remover elimina DiggBar la manera más inteligente
- Post codes to blog posts/comments with Postable Códigos postales a los puestos de blog / comentarios con Postable
Great tip thanks Gran punta, gracias