|
>Free printable Sudoku Puzzles | Custom Word Search Puzzles | iptocountry.info | Free web storage |
| Do not show Meta Tags to regular visitors, but show them to robots |
This is a trick. As a script it has no value.
The basic idea is that your visitors will not normally check your META TAGS, so it is useless to send them that information. But META TAGS can not be removed forever as they are important for robots. How may we avoid sending that information to our visitors without removing it? The solution will be to discern between robots and visitors.
We do not know how to identify all robots, but we can obtain information on the browser visitors are using, and this is want we have done in the script shown in the table.
| <%
Userbrowser=request.servervariables("HTTP_USER_AGENT") if instr(Userbrowser,"MSIE ")>0 then %> <!-- metatags.txt //--> <% else %> <meta name="keywords" content="keyword1,keyword2,keyword13,keyword4,keyword5,keyword6,keyword7,keyword8"> <meta name="description" content="The best of all sites in the word is described here"> <% end if %> |
The browser of the visitors can be obtained with this code:
request.servervariables("HTTP_USER_AGENT")
For example: your browser is CCBot/1.0 (+http://www.commoncrawl.org/bot.html).
As most of browsers used at the moment are different versions of Microsoft
Internet Explorer (over 90 % in this site; they all will return within
the code obtained with the code above the substring "MSIE"), in the script
above we have decided to display an alternative information to those browsers:
<!-- see /metatags.txt //-->
A visitor who wants to see our meta tags will need to visit the corresponding file. Meanwhile, the rest of visitors have saved time, and our server has had less work (in our main page we have stop transmitting over 10 MB per day this way).
As robots are not using Microsoft Internet Explorer they will get all the information included in meta tags. Additional browsers (but MSIE) will also show meta tags.
|
|
Create word search puzzles with your own words
|
2008@ AspTutorial.info. All rights reserved.