La Enciclopedia Libre Universal en Español dispone de una lista de distribución pública, enciclo@listas.us.es

Usuario:Edgar Enyedy/WikiMetaTags

Artículo de la Enciclopedia Libre Universal en Español.

Saltar a navegación, buscar

Split the title into separate words and put them in a MeatBall:MetaTag so that search engines may index the site more intelligently. -- SunirShah


Add

Ver también : Edgar Enyedy$MetaKeywords to use vars qw().


# Minor options: 
...

Ver también : Edgar Enyedy$MetaKeywords = 1; # 1 = Google-friendly, 0 = search-engine averse


sub GetHtmlHeader {
  ...


Ver también : Edgar Enyedy$html .= "<HTML><HEAD><TITLE>$title</TITLE>\n";

Ver también : Edgar Enyedy if( $MetaKeywords ) {

Ver también : Edgar Enyedy my $keywords = $OpenPageName;

Ver también : Edgar Enyedy $keywords =~ s/([a-z])([A-Z])/$1, $2/g;

Ver también : Edgar Enyedy $html .= "<META NAME='KEYWORDS' CONTENT='$keywords'/>\n" if $keywords;

Ver también : Edgar Enyedy }
  ...
}

A long time ago I was told that whatever you do nothing on a cgi page would ever be indexed. The explanation was that all search engines refuse to handle any url with a ? in it. Has that changed? was it always wrong? I do hope I am wrong, as it would be nice to have the option of being visible to Google --RiVer


When their indexing capacity was limited, they didn't gather cgi-generated htmls, but recent web robots gather cgi-generated htmls. Some robots mind the meta tag and robots.txt file, but others don't. If u want to block some cgi from robots, you can check the user-agent variable.


See http://sunir.org/apps/refers.pl. Normally Google is the number one referrer. -- SunirShah



Assuming that times have changed and there is any point at all in producing METAs, I'd like to make two alternative suggestions


Simple idea: allow the meta tag to be placed on the wiki page, then the user can index whatever keywords they want. And, more to the point, pages are only indexed when the user so wishes. If I read your code correctly it will index every page. This would be somewhat along the lines of the following (untested) code

$pagetext =~ /^(<META  *NAME=KEYWORDS  *CONTENT=.*?>)/; 

$html .= $1;

Or, maybe you don't want to give users HTML (too hard for newbies, too dangerous for sneaky hackers) then I suggest new wiki tag <SEARCHKEYS blah> with the (untested) code

$pagetext =~ /^<SEARCHKEYS\s\s*(.*?)\s*>//;

$keywords = $1;

$keywords =~ /=.*//; #makes sneaky hack stuff innocuous

if ($keywords) {

 $keywords =~ s/([a-z])([A-Z])/$1, $2/g;
 $html .= "<META NAME='KEYWORDS' CONTENT='$keywords'/>\n";

}

Just ideas...


(PS $pagetext is not the correct variable name, maybe I'll correct it later but fel free to do so yourself)


--RiVer


Don't add more pointy brackets. That's just annoying. Even the #REDIRECT idiom is annoying because it conflicts with ordered list syntax. Instead, use the LinkPattern:



---BEGIN---

MetaKeywords: this, is, a, list, of, keywords



This is the beginning of the document. Notice now MetaKeywords is on the first line by itself. Don't emit that.

---END---


Sure this screws over the free link people, but... wait, I don't care. ;) -- SunirShah


Please don't call them MetaKeywords - one of the nice things about wiki markup is it is not so geeky looking as HTML. I strongly agree that means no pointy brackets, but it also means we don't use words like META. Suggestions would therefore be


SearchKeys: this, is, another, list

or

SearchEngines: and, so, is, this

--RiVer


A way to allow keyword searches with no modification to the program is to use tight spacing:

keys,code,patch,upgrade


Then search with prepended commas, so you can find a patch by searching for ",upgrade" without getting every page that uses "upgrade" in its text -- only keywords have leading commas. --JerryMuelver




The meta tag is an HTML tag that resides in the <HEAD></HEAD>. It provides random "meta" information for non-human agents (er, software).


There are lots of meta tag types, and they are defined loosely, outside the standard. That makes them really hard to pin down, much like XML tags. Consequently, I always lose track of them. So, I'm going to list some here.





The category of the page.




The date should be in RFC822 format. If it is 0, the page expires now.



Tells the browser not to cache the page; doesn't work in MSIE4.


See http://www.rsac.org"".


Set the MIME content of the page.




Note that tags using the HTTP-EQUIV attribute behave exactly as they would in HTTP headers. In fact, sometimes front end processors will just generate the corresponding HTTP header. HTTP headers are defined in RFC1945 (HTTP/1.0) and RFC2068 (HTTP/1.1).




There is a complete listing at http://vancouver-webpages.com/META"". And by complete, I mean complete. Many of the tags will not be recognized by common browsers.




My favourite so far is from http://www.cyberpunkproject.org



-- SunirShah


Almost all META tags are used only by browsers and search engines - proxy caches simply ignore the META tags and only look at HTTP headers. So the cache control tags are fairly useless. See TWiki:Codev/BrowserAndProxyCacheControl for some useful articles and a cacheability tester (see how cacheable your Wiki site really is...).

-- RichardDonkin



Ver también : Edgar Enyedy
Herramientas personales
Espacios de nombres
Variantes
Acciones
Navegación
Herramientas
Crear un libro