Posts Tagged ‘Instead’

Cookies vs Sessions

Tuesday, July 29th, 2008

The main difference between cookies and sessions is that cookies are stored in the user’s browser, and sessions are not. This difference determines what each is best used for.

A cookie can keep information in the user’s browser until deleted. If a person has a login and password, this can be set as a cookie in their browser so they do not have to re-login to your website every time they visit. You can store almost anything in a browser cookie. The trouble is that a user can block cookies or delete them at any time. If, for example, your website’s shopping cart utilized cookies, and a person had their browser set to block them, then they could not shop at your trouble .

Sessions are not reliant on the user allowing a cookie. They work instead like a token allowing access and passing information while the user has their browser open. The problem with sessions is that when you close your browser you also lose the session. So, if you had a site requiring a login, this couldn’t be saved as a session like it could as a cookie, and the user would be forced to re-login every time they visit.

You can of course get the best of both worlds! Once you know what each does, you can use a combination of cookies and sessions to make your site work exactly the way you want it to.

GOOGLE TOOLBAR

Tuesday, July 15th, 2008

Instead of going to Google.com each time to search, it’s much faster to have Google built into your browser. Several options:

* My preferred browser for PC or Mac is Firefox <getfirefox.com>, which already has built-in Google. You should download the free Googlebar extension <googlebar.mozdev.org> or the official Google Toolbar <toolbar.google.com> (the Google Toolbar also works on PC Explorer). Faster searches; pop-up blocker; highlighting; word find (go directly to a word/phrase on a page). Be sure to get the Cool Iris extension for Firefox, which lets you preview Google results.

doubleval vs floatval in php

Monday, July 14th, 2008

Both these functions allow you to quickly pick a float, or double, out of a string.

doubleval vs floatval
doubleval: 4.56571412086 seconds
floatval: 4.35375285149 seconds
Time saved: 0.211961269379 seconds; 4.8684727087%

4% or 211 nanoseconds is next to nothing. I would want to use floatval but I wouldn’t exactly be kicking myself if I slipped a doubleval into my code instead.

What are these SEO Hats?

Thursday, June 26th, 2008
  1. Black Hat SEO’s (aka SEO spamming) goal is to heavily leverage technology in order to get fast results. This means quickly getting their web site to the top of the Search Engines, which quickly catch on and ban them.
  2. White Hat SEO focuses upon building quality content. These web sites are built for people, not for the Search Engines, and the webmasters rely more upon content, combined with their marketing skills, to get them top results.  These webmasters understand that this is going to take time and so they do not rush the results and thus run absolutely no risk of being banned by the Search Engines.
  3. Gray Hat SEO varies in its use of questionable tactics as well as the risks that they take. While some techniques may be frowned upon by the Search Engines, they are not necessarily against their rules. However, other techniques may be more risky and should be carefully considered before use.

So, which SEO hat should you wear? This depends upon your goals and objectives. However, you probably should not use black hat since it is so short-lived. Instead, strive to wear a white hat. Sometimes gray hat techniques also make sense but do not take too big of a risk if your web site is quite valuable.

Anchor Text, How Important is it Anyway?

Saturday, June 21st, 2008

What is Anchor Text?

Anchor text is the hyper-linked text that allows the user to move around web sites.

Anchor Text Relevancy

From a search engine stand point it is important that the anchor text be relevant to the information that it points to. If it is it can improve your ranking in the search engines. So for example if your web site is dedicated to selling exercise videos and the page that you are going to point to has numerous articles on exercise videos then you have a high relevancy.

To achieve even higher relevancy make sure that the integrity of the document that your pointing to has been marked up with those same anchor text phrases. I.E. The page title of the page you are going to is called “exercise videos” and your anchor text is the same.

What Not To Do:

It is a common mistake to see people use “click here” in anchor text. In doing this you are loosing many possible users. Instead use descriptive anchor text phrases that are relevant to the subject matter.