Language:

Hide metatags

Language: English
Programming Language: VBScript
Published by: Dennis Pallett [not registered]
Last Update: 5/9/2006
Views: 375

Description

Use this handy function to hide all your real metatags for people, but not for search-engines

Code

1 Dim sBrowser 2 3 sBrowser = Request.ServerVariables("HTTP_USER_AGENT") 4 5 If InStr(1, sBrowser, "IE") <> 0 Or InStr(1, sBrowser, "Mozilla") <> 0 Or InStr(1, sBrowser, "Opera") <> 0 Then 6 ' a browser - show some junk to make them think we're idiots 7 Response.Write "<meta name=doublequoteKeywordsdoublequote content=doublequotesome throwaway wordsdoublequote>" & vbCrlf 8 Response.Write "<meta name=doublequoteDescriptiondoublequote content=doublequoteA short descriptiondoublequote>" & vbCrlf 9 Else 10 ' an unknown browser - probably a spider 11 Response.Write "<meta name=doublequoteKeywordsdoublequote content=doublequoteImportant phrase or keyword, another onedoublequote>" & vbCrlf 12 Response.Write "<meta name=doublequoteDescriptiondoublequote content=doublequoteA full description of your site goes here.doublequote>" & vbCrlf 13 End If

No comments avaiable

Add a comment

Name *  

Email (won't be displayed) *    

Website  

Comment *  

Sicherheitscode Security Code *    

RSS