Posts Tagged ‘name’

How to Delete Cookies?

Tuesday, July 29th, 2008

One thing you may have noticed if you have started writing Javascript to use cookies is that there is no actual delete command that can be used to delete a cookie after you have created it. This doesn’t mean that you can’t delete cookies, it just means that you need to understand how cookies work in order to be able to control when the system will delete them for you.

When you create a session cookie it will continue to exist for as long as the browser remains open and will be deleted as soon as the browser is closed. This is because session cookies are actually retained in memory by the browser and are never actually stored anywhere. You do not specify an expiry date when creating a session cookie.

If you want a cookie to last for a longer (or shorter) time than you get wioth a session cookie you need to create a first party cookie instead. With a first party cookie the cookie is actually stored in a file on your visitor’s hard drive. You specify an expiry date/time when creating a first party cookie that defines how long the cookie is to be retained on the hard drive. The cookie isn’t necessarily deleted when that date/time is reached but cookies that have passed their expiry date/’time are ignored and so as far as the browser is concerned they don’t exist.

So how does this help us if we decide that we need to delete a cookie befre the date/time that it is set to expire? Well the solution is quite simple, we change the expiry date of the cookie so that it will be considered to have already expired. Rather than having to remember what to do each time, let’s just create a small function for deleting whichever cookie that we want.

function del_cookie(name) {
document.cookie = name +
‘=; expires=Thu, 01-Jan-70 00:00:01 GMT;’;
}

Now all we need to do is to call this del_cookie() function passing it the name of whatever cookie it is that we wish to delete. The function will update the expiry date on the cookie to one long in the past so that the cookie will be considered to be expired and will be ignored by the browser exactly the same as if it didn’t exist.

Why choose that particular date for setting the expiry date to delete the cookie? Well it just happens that all of the date processing within Javascript sees the 1st January 1970 as its starting date and actually records all date/times internally as the number of milliseconds from midnight on that day. Using that date therefore is effectively equivalent to setting the expiry to zero which means that the cookie will be deleted even if your visitor has the date on their computer set incorrectly. Were we to choose a more recent date it would be possible (although very unlikely) that one of our visitors might have their computer date set incorrectly to one earlier than the exipry that we chose and so our attempt to delete the cookie wouldn’t then work for them.

What do you do in a situation where there’s an old, story the client feels is unfair and maybe even untrue, but it ranks for the client’s name and then you hit a home run for the client and they get coverage in the New York Times, Wall Street Journal, USA Today, Newsweek, Time Magazine and this pesky story still ranks for their name. What do you do?

Tuesday, July 15th, 2008

The reason that old story ranks so well for the client name is because of links. One of the first things you do is to engage in a link building campaign that attracts links to other positive representations of that brand name. If an organization is holistically optimizing their content and leveraging their digital assets as well as keyword messaging across all digital communications, and then promoting and getting links to that content, cumulatively it will have the desired effect.

If the other pickups are permanent, i.e. not temporary and not behind a login, then the company can work to get links to the other positive representations of their brand to increase the rankings of those stories and push down any negative results.

GOOGLE ALERTS News , mail

Tuesday, July 15th, 2008

<google.com/alerts>: Allows you to receive e-mails as soon as a phrase you wish to track shows up on either the main Google Index (web) or on Google News (news). Excellent way to track particular stories and topics that interest you - including items about you. You can set up and delete alerts as necessary. For those who need more, there’s GOOGLEALERT.COM, a pay site not affiliated with Google. You can also do your own ego surfing: create alerts for your name.

Seo:Choosing A Good Domain Name

Tuesday, July 1st, 2008

Domain names figure into the ranking with some search engines. If you do not already have a domain name picked, then from an optimization standpoint it is a good idea to pick a domain name that says what your business is and has your main keyword as part of your domain name.

For instance, if you sell automobile tires online, from a keyword standpoint, you would want to purchase a domain name such as shellytires.com or shelly-tires.com instead of just shelly.com. The “tires” portion of you domain name, with all things being equal with your competition, will help you achieve a higher search engine ranking with some search engines.

If you do a Google search for a certain keyword or keyword phrase you will see your keyword/s highlighted if the different websites in the search results. If you have a keyword or keyword phrase in your URL, then this too will be highlighted which leads one to believe that Google gives some weight to keywords in the domain names.

If you already have a domain name that you are using that tells what your business is about but has no keywords in it, then don’t despair since this is only a minor consideration with most search engines in their ranking algorithms. But if you have a choice of building a website from the ground up, then choosing a domain name with your main keyword embedded, may give you a slight edge in the search engine ranking wars.

PHP:Protect your data from user input

Monday, June 30th, 2008

I came to a point where I needed to filter the user input (not just tell the user something like : “The username isn’t in the right format” or “Please choose a valid name for your username”), I mean let him to input in the form anything he wanted too but in the end what we store in the database is his processed input (only A-Z, a-z and 0-9).
I had the Visual Basic and C++ thinking .. I must do that and that and that to get rid of unwanted characters. It was a little time consuming and I was in hurry so I googled and I reached the ereg_replace help page on PHP.net website. Suddenly all became much much easier :D, just write a regular expression (ohh, by the way .. if someone asks I can write a small tutorial on regular expressions) like this : “[^A-Za-z0-9]” and that was it :).

Below is a small example on how to filter (remove all characters except uppercase/lowercase letters and numbers)

1. <?php
2. //our string
3. $str = “nek#$#hbet|20&&07″;
4. $filtered = ereg_replace(”[^A-Za-z0-9]“, “”, $str);
5. print $filtered; // will print ‘nekhbet2007′
6. ?>

PHP is a strong language with a lot of functions that help us to decrease the development time. So before thinking how to do a certain thing just take a look first at www.php.net and see if what you need isn’t already done

SEO:Disable search engines cache

Monday, June 30th, 2008

<META NAME=”ROBOTS” CONTENT=”NOARCHIVE”>

SEO:Disable Google web site/page cache

Monday, June 30th, 2008
<META NAME="GOOGLEBOT" CONTENT="NOARCHIVE">

Does a Domain Name Help with Higher Rankings?

Saturday, June 21st, 2008

Based on the latest patent filing from Google the answer to this question is yes. Google states that how a site is hosted and the length of time that a domain name has been paid for does help in how a web site ranks. Google considers a domain name that has been paid for, for more than one year a more credible domain since throwaway domains are rarely used for more than one year. Google looks at the following information:

* how long has the domain name been paid for in years
* how long has the hosting company been around
* how many web pages the web site has (one page is not good)
* who the owner, admin and contact names are in the registrars records

Google keeps track of bad name servers and can tell whether or not a spammer is running a domain.

Following the steps above could make your rankings improve!

Google’s Only Rank For Your Own Name Penalty

Thursday, June 19th, 2008

Up until about 2-3 months ago I was only aware of two real Google penalties. The outright ban, where a site will be completely removed from the Google index and the minus 40-60 penalty.

About 2-3 months ago I started talking to a local company about helping them with their SEO. It looked like they wanted to do something and they were just thinking things over. Next the guy called me up and said that all of his Google rankings had disappeared and that the only thing his site was coming up for was the name. The site came up no.1 for his two word company name and no.1 for the domain. However all of the other positions the site had with the homepage, albeit not good ones had disappeared. Even when I tried searching for some unique text off the homepage in quotes it did not come up. So I asked the guy a couple of questions, you know - have you made any changes recently that could have caused this to happen? etc. The guy said that the only thing he could think of was that he had placed a load of area names on the bottom of the homepage in tiny text so that no body could see. I said “bingo, that is why the site is penalised, you put hidden text on”.
This was totally my fault and looking back it was really bad and stupid.

This is the only time I have ever got a client penalised by any search engine. The site had about 130 categories and I placed an SEO friendly drop down menu on the homepage and the rest of the pages to the 130 categories. I saw some progress with the rankings initially, but around a week later the site got hit with the exact same penalty, this time it was not just the homepage that got hit, it was all of the pages where I had placed the drop down menu. It was ranking for the company name with and without Ltd, the domain and that was it. I was scared as hell, I had to tell this guy that I had got his site penalised. I spoke to the owner about it and he was so cool you have no idea, it is a good job I choose my clients carefully. Now technically I had done nothing wrong, but it looked seriously spammy - I showed it to a friend and he said “no wonder you got penalised, you’ve got hidden text, hidden links and keyword stuffing” (not technically right, but that is what it looked like). I am still waiting for the developers to finish the new site on this one.

Weather this is a new penalty or not I do not know. It is different to the minus penalty because when pages are hit they do not show up anywhere, no matter what. It is different to the outright ban because effected sites stay in the index and rank for their own names. Have any of you ever seen a penalty like this? It can definitely be applied for hidden text, it could possibly be applied for hidden links or keyword stuffing.

Manage Saved Ie Passwords

Wednesday, June 18th, 2008

When you enter a user name and password, Internet Explorer may ask if you want it to remember the password. Click on Yes and it will automatically fill in the password next time you enter that user name. But if you check Don’t offer to remember any more passwords, then whether you click on Yes or No, you won’t be prompted again. To recover this feature, launch Internet Options from IE’s Tools menu, select the Content tab, click on the AutoComplete button, and check Prompt me to save passwords.

To delete an individual saved password entry, go to the log-on box on a Web page and double-click. Your saved AutoComplete entries will drop down. Use the arrow keys to scroll to the one you want to delete, and press the Del key.