Subscribe to RSS feed Subscribe to RSS feed or vai follow me sekojiet man on Twitter? on Twitter?
Digg recently Digg nesen introduced DiggBar ieviesa DiggBar to mixed reactions. jauktas reakcijas. We also shared a Greasemonkey script to Mums piekrīt arī Greasemonkey skriptu remove DiggBar noņemt DiggBar , only to discover later that it can be Tikai atklāt vēlāk to varētu turned off from Digg preferences izslēgts no Digg preferences . . However, DiggBar is enabled by default, and most readers are unlikely to turn it off themselves. Tomēr DiggBar ir iespējota pēc noklusējuma, un lielākā daļa lasītāju ir maz, lai to izslēgtu sevi. Here is a JavaScript code to remove DiggBar – bloggers and webmasters who find DiggBar damaging would probably find this useful. Šeit ir JavaScript kods, lai novērstu DiggBar - blogeriem un webmasters, kuri atrodas DiggBar bojā, iespējams, atrast šo noderīgo.
Reasons to remove DiggBar Iemesli, lai atdalītu DiggBar
So, what is the damage? Tātad, kāds ir kaitējums? DiggBar does a 200 HTTP code (hence depriving sites of DiggBar nav 200 HTTP kods (līdz ar to liedzot vietas Google juice Google sulas ). ). If a hundred sites link to your blog using the Digg shortened URL, all that juice goes to Digg. Ja simts vietām saiti uz jūsu blogu, izmantojot Digg saīsināts URL, viss, kas sula iet uz Digg.
Can rel=”canonical” be used to suggest a canonical url on a completely different domain? Vai rel = "kanonu" var izmantot, lai ierosināt kanonisko url pilnīgi citā domēnā?
No. To migrate to a completely different domain, permanent (301) redirects are more appropriate. No. migrēt uz pavisam citu domēnu, pastāvīgi (301) redirects ir piemērotāks. Google currently will take canonicalization suggestions into account across subdomains (or within a domain), but not across domains. Google pašlaik ņems canonicalization ierosinājumus vērā visā apakšdomēnu (vai robežās jomā), taču ne visās jomās. 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 Tā vietā īpašnieki var norādīt kanonisko lapu www.example.com no kopuma lapu example.com vai help.example.com, bet ne, piemēram, widgets.com
- -- About rel=canonical Par rel = kanonisko , Google Webmasters help , Google Webmasters palīdzēt
Canonical tag which would not work (because canonical tags work only within a domain, not cross-domain). Kanonisko tagu, kas nedarbojas (jo kanonisko tagi strādā tikai domēnu, ne aiz domēna).
How to remove DiggBar (code) Kā noņemt DiggBar (kods)
Initially, this article contained only the JavaScript method, but upon further searching, I also found a PHP code. Sākotnēji šajā pantā ietverts tikai JavaScript metodi, bet pēc papildu meklēšanu, es arī konstatēja PHP kodu. Both methods are shown here, and each is useful for different scenarios. Abas metodes ir parādītas šeit, un katrs ir noderīga dažādiem scenārijiem.
Javascript code Javascript kods
The JavaScript method redirects the user to the actual page. JavaScript metode novirza lietotāju uz Faktiskā lappuse. Enter this code block within head tags of your pages. Ievadiet šo kodu bloku, kas galva tagi jūsu lapām.
<script language="JavaScript" type="text/javascript"> <script LANGUAGE="JavaScript" 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. Iepriekš koda noņem visiem rāmjiem, tostarp karkasi, ko rada Google attēlu meklēšanu. If you do not like image search visitors seeing the above code, use it always. Ja jums nepatīk attēlu meklēšanas apmeklētāji redz iepriekš kods, izmantojiet to vienmēr. If you wish to remove DiggBar only, use it only when your blog is Dugg/about to be dugg. Ja jūs vēlaties noņemt DiggBar tikai to izmantot tikai tad, kad jūsu emuārā ir Dugg / par ko 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. Tādā veidā jūs varat labāko no abām pasaulēm - attēlu meklēšana apmeklētāji redz rāmis uz augšu, kamēr DiggBar izņem laikā pieplūdums apmeklētāju (kas, kad apmeklētājiem būs saite ar jums un grāmatzīmi jums.
PHP code PHP koda
John Gruber John Gruber posted a PHP snippet posted PHP fragments that detects DiggBar (from the URL) and shows them a greeting message. kas atklāj DiggBar (no URL) un parāda tos apsveikuma vēstuli.
This PHP snippet merely shows a message to the visitor and stops loading the page – without redirecting the user. Šis PHP fragments parāda tikai ziņu apmeklētājs un aptur iekraušana lapu - bez novirzot lietotājam. You may want to show a hyperlink to the actual page. Jūs varat parādīt hipersaiti uz Faktiskā lappuse.
<?php if (preg_match('#http://digg.com/\w{1,8}/?$#', <? php if (preg_match ( '# http://digg.com/ \ w (1,8 }/?$#',
$_SERVER['HTTP_REFERER']) ) { $ _SERVER [ 'HTTP_REFERER'])) (
echo "<p>Special message for Digg users here.</p>"; echo "<p> Īpašā ziņojuma Digg lietotājiem šeit. </ p>";
exit; exit;
} )
?> ?>
The above code checks whether the referral URL is digg.com followed by 1 to 8 characters – which is typical of the DiggBar. Iepriekš kods pārbauda, vai nodošana URL ir digg.com seko 1 līdz 8 simboliem - kas ir tipiska DiggBar. If yes, it shows a message to the visitors (written within quotes on line 2) and stops loading page. Ja jā tas parāda ziņa viesiem (rakstveida laikā quotes gada 2 līnijas) and apstāšanās iekraušanas lapā.
Related reading Related lasījums
- New and improved method to remove / block DiggBar Jaunas un uzlabotas metodes, lai novērstu / bloķēt DiggBar
- How to remove DiggBar (Greasemonkey script) Kā noņemt DiggBar (Greasemonkey script)
- DiggBar Remover removes DiggBar the smart way DiggBar Remover noņem DiggBar Gudrs veids
- Post codes to blog posts/comments with Postable Post kodu blog posts / comments ar Postable
Great tip thanks Great tip thanks