Posts Tagged ‘exactly’

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.

Displaying HTML Web Page Text in a Specific Font Style

Sunday, July 13th, 2008

The FONT tag is used to display your text in a specific style.

Although you may specify the font style you would like your text to be displayed, please keep in mind, if your visitor doesn’t have the font face you specify on their computer, the text will be displayed in the users default font setting.

To make sure your pages are being viewed as you intended, you should include alternative fonts within your HTML web page font tag.

<FONT face=”Verdana,Helvetica,Arial”>Your Text</FONT>

The code above tells the browser to display your text in Verdana, but if your visitor doesn’t have Verdana to display your text in Helvetica and so on.

By including font alternatives, you can ensure your page will be displayed exactly as you had intended.

SEO:Keyword Searching

Monday, June 30th, 2008

This is the most common form of text search on the Web.  Most search engines do their text query and retrieval using keywords.

What is a keyword, exactly?  It can simply be any word on a webpage.  For example, I used the word “simply” in the previous sentence, making it one of the keywords for this particular webpage in some search engine’s index.   However, since the word “simply” has nothing to do with the subject of this webpage (i.e., how search engines work), it is not a very useful keyword.   Useful keywords and key phrases for this page would be “search,” “search engines,” “search engine methods,” “how search engines work,” “ranking” “relevancy,” “search engine tutorials,” etc.  Those keywords would actually tell a user something about the subject and content of this page.

Unless the author of the Web document specifies the keywords for her document (this is possible by using meta tags), it’s up to the search engine to determine them.  Essentially, this means that search engines pull out and index words that appear to be significant.  Since since engines are software programs, not rational human beings, they work according to rules established by their creators for what words are usually important in a broad range of documents.  The title of a page, for example, usually gives useful information about the subject of the page (if it doesn’t, it should!).  Words that are mentioned towards the beginning of a document (think of the “topic sentence” in a high school essay, where you lay out the subject you intend to discuss) are given more weight by most search engines.   The same goes for words that are repeated several times throughout the document.

Some search engines index every word on every page. Others index only part of the document.

Full-text indexing systems generally pick up every word in the text except commonly occurring stop words such as “a,” “an,” “the,” “is,” “and,” “or,” and “www.”  Some of the search engines discriminate upper case from lower case; others store all words without reference to capitalization.

Regular Expressions for input validation?

Saturday, June 28th, 2008

It is always a good idea to try and avoid regular expressions, where possible and practical. There are functions in PHP which will do exactly what some regular expressions do, but faster. Take this example:

if(ereg(’[0123456789]‘, $number)) {
// Is integer
}else{
// Is not integer
}

It is much faster to do this instead:

if(ctype_digit($number)) {
// Is integer
}else{
// Is not integer
}

To test this, I used ereg(’[0123456789]‘, $number) 1,000,000 times, followed by using ctype_digit($number) 1,000,000 times. Here are the results:

Regular Expressions: 2.401 seconds
ctype_digit: 0.985 seconds
Time saved: 1.416 seconds; 58.98%

JavaScript Forms

Saturday, June 21st, 2008

Being able to successful create JavaScript forms isn’t a difficult process but it may be one that you are unsure about. The common misconception that creating web pages takes an expert computer programmer just isn’t true. While you will use HTML to create JavaScript, you need to realize that they aren’t exactly the same.

With JavaScript you will have several different handlers that the user can click on to perform the necessary actions. This is very important because the easier your web pages are to navigate the more interested consumers will be in them. Some people are very new to using the internet and others are experts so you want to be able to appeal to the level of skill of everyone.

The various JavaScript forms that you create will have coding inserted behind the scenes where the consumer can’t see them. For example your site may have an opt in form for the user to complete. At the bottom they simply click on the form that says SUBMIT. The codes you have entered behind the scenes work to process the information that they have provided.

In order to have a successful JavaScript form called a widget, you need to have several elements in place. They include the form name, the action you want the user to be able to perform, a method for that information to be processed, and a value for each of the JavaScript forms.

There are many different ways in which you can set up JavaScript forms on your web pages. While a simple box that they click is the easiest you may want to offer a radio box or drop down menu if there is more than one option they can select from. You can also offer a text box if you want the user to be able to type in various information.

Before you put your web pages up for consumers to look at, you want to take the time to validate all of the information you have placed into the various JavaScript forms. The goal is for everything to work exactly as it should on the first try. If you come across JavaScript errors you should check each field of entry again. It is going to take some time to master JavaScript but once you do it will become one of the most valuable tools you have to offer.

SEO for Bloggers

Thursday, June 19th, 2008

Blogging is uniquely suited for search engine optimization, because the search engines definitely favor websites that have lots of relevant, easily updated content. However, there are ways you can maximize your blog’s promotional abilities - SEO techniques you can use to “blogcast your brand”.

Here’s a rundown of my SEO for Bloggers series:

Part 1: Getting Started with SEO. Start here to learn exactly what SEO is and the basics of how to use it to promote your message, including choosing your keywords properly. If you only read one of these posts, read this one (but you really should bookmark them all!).

Part 2: Link Building and Link Popularity. This post covers a key component of any blogger’s SEO strategy: getting tons of incoming links. Search engines love websites that lots of people are linking too - after all, popular blogs are popular for a reason, and that reason is simple: people like ‘em.

Part 3: Link Baiting for Fun and Profit. Link baiting is the art of getting other bloggers and webmasters to link to your site by creating interesting posts that benefit your readers in some way, shape, or form. After all, people link to content they find compelling.

Part 4: Building Your Cornerstone. Strong flagship posts are the pillars of blog - they are your most compelling content, they bring in the links, and they naturally have an ultra high keyword density.

Part 5: Off-Site SEO and the Social Media. This post describes how to use the social media networks and the user-driven aspects of Web 2.0 to enhance and promote your blog. There are a whole lot of amazing tools and communities out there, so use them to your advantage.

There’s one more point to remember about SEO, and that point is that the results generally don’t happen over night. Yes, content can go viral, but building a popular blog with lots of readers takes time - you have to develop your keyword-dense cornerstone content, to build link popularity and generate incoming traffic, and to make a name for yourself in your niche.

All of these articles are in our SEO for Bloggers category!

Don’t forget these free blogs are supported by our clients at MyTypes and the SEO Services clients for Keith and Bennett. Our original co-founder Vipin Singh no longer works with our projects. He is off working full time at a high-tech company. Our clients include PeopleFinders for Background Check, VRBO for RentExpert.com, Web Design St. Louis, and Air purifiers by Steril Air Purifier. We also promote the marketing book our company published that has the simple SEO and blogging strategies for the average person. It’s for sale on Amazon and we would love for you to buy it. We are also launching a Vacation Top Spots blog as we are focused on the Vacations business not only through the VRBO services of RentExpert, but love to write about travel related topics.