A potpourri of Web Developmemt, Linux, and Windows tidbits and observations

Google Won’t Search

Posted by dale | Browsers,Companies,Software | Wednesday 17 March 2010 11:22 am

Instead of a portal, I use Google as my home page in my browser. I like the clean look, and when I’m looking for something, I don’t want to be distracted by a lot of information that you would find in most portals.

Recently I had a problem with Google. I typed in my query into the Google window, hit the search button, and nothing happen, no search results. Hmmm…what’s going on?

Let me digress for a moment to a pet peeve of mind. People who make software programs are human and want to make money just like the next guy. A way that software distributors make extra money is to load someone elses companion program along with their application. This companion program is usually made to be unobtrusive, not easily noticed, and usually is implemented in the form of a toolbar in your browser’s upper window. The “Ask toolbar” is probably the biggest culprit of this technique at the moment.

Normally when you load a utility program, during the installation, they give you a check box to uncheck, if you don’t want the toolbar loaded, but sometimes they just load it. Well behaved toolbars that suddenly pop up in your browser, usually can be turned off by right clicking on the toolbar, and turning off the toolbar you don’t want.

Back to the problem. Microsoft with their new Bing Search engine is desperate, and I do mean desperate, to gain market share in the search engine wars. They’ve decided to go the way of the “Ask toolbar” and load their toolbar into your browser when you load utility programs. This toolbar loads without an option not to load, and it puts their Bing search box prevalently in the upper left window, where you go for the “back” button.

Most folks, will not initially notice it, but if they do, and want to turn it off, a right click in the toolbar will not find the Microsoft Bing toolbar in the list of toolbars, not nice.

When a Google search does not return search results, I could see an unsuspecting user going right up to the Bing search bar, and doing their search from there, just what Microsoft wants.

Knowing and loving Microsoft the way I do, and seeing the Bing search box on my toolbar, I immediately suspected that there was some foul play going on here. I decided to get rid of the Bing toolbar. It turns out the only way to do that was to go to “Add Remove Programs” in the Control Panel. Once I removed the Microsoft Bing toolbar, and restarted my browser, the Google search results miraculously returned.

Now I’m not saying that Microsoft would make a toolbar that would interfere with the operation of a competitor’s program. I know Microsoft would never do that intentionally. They might change the format of Word documents with every release to make competitors trying to open their documents not be able to do that without a lot of work. Nor would I ever accuse Microsoft of intentionally slowing your computer down with every security update, so you would think your computer was getting old and slow, and go buy a new computer and operating system. I’m sure Microsoft only has benevolent intentions.

No, I’m just writing this post to let you know how to fix the problem if you find that Google will not give you search results, and you happen to have a Bing search box in your browser toolbar.

Opera 10.50 released

Posted by dale | Browsers,Software | Friday 5 March 2010 4:42 pm

I keep writing about the Opera browser, I can’t help myself.  Opera Software has put the Opera web browser at the forefront of web browser technology with innovative features, some of which are unique to the Opera browser.  Admittedly the browser technology crowd is an incestuous bunch, and steal ideas back and forth from one another, still Opera has been doing it better, and more uniquely than any other browser for a couple of years now.  What I don’t understand is why it only has 3% of the market share, it deserves a larger share of the market.  Here’s why.

With this new release 10.50, Opera has introduced a new JavaScript engine, actually three new engines combined, that together, increase the speed of the browser up to seven times faster than the previous version, which was already fast.  Opera Software claims Opera 10.50 is the “Fastest Browser on Earth.”  It is.  Couple that with a perfect score of 100 on the ACID3 test, and you have a state-of-the art, W3C web compliant, lightning fast, web browser, and there’s so much more.

Opera has joined Cloud Computing in using additional servers on the Internet to enhance your browsing experience in three ways that currently no other browser supports. First, we have Opera Turbo.  Opera Turbo can be used by people with slower Internet connections.  Opera turbo compresses the web page on the server to up to 80% of its original size to speed your download speed.  This will improve your browsing speed on some of the slower wifi connections in retail coffee houses also.

Second, we have Opera Unite. Opera Unite allows you to share music, videos and documents with friends without having to either email the content to them, or uploading the content to a server.  It sets up a virtual server between your friends over the Internet. This means larger content files like movies can be shared with your friends easily.

And finally, we have Opera Link.   For those familiar with Delicious, a web service that allows you to centralize all your bookmarks and put them on the Internet, Opera goes one step further.  You set up your Link account in each of your computer browsers.  From then on Opera Link can keep your Bookmarks, Browser configuration, history, Speed Dial, Notes, and Searches synchronized with all the rest of your Opera browsers automatically.  If you set a new bookmark in your browser at work, it will automatically show up on your home browser.

That brings up Speed Dial, which shows you images of your favorite web pages you can click on when you open a new browser window.  Unique to Opera is Visual Tabs, pull down the menu tab bar and an image of the web pages in your tabs are shown.  For those small fonts on the web page, and for readers who can’t see the page, there is a Page Zoom icon to quickly zoom in to the web page with a simple click of the Page Zoom icon on the bottom right toolbar, that’s nice.   With Notes, you can select some text on a web page, right click, and save it to Notes.  This automatically saves the text and the web URL, for reference later.  And it’s not limited to one note, like Microsoft’s copy and paste.

Then we have faster browsing with a series of enhancements.  Mouse Gestures allow you to customize your mouse movement. To give you an example, right click on your mouse, and move your mouse to the left, and you’ll go back to your previous web page, no more having to place your mouse on the “Back” icon at the top of the browser to go back one page. There’s Fast Forward to go to the next page, like the back button, this one guesses what your next page would be, and takes you to it.  No more going to the bottom of the Google page to find the next page number.  And there’s a fast back to take you to the original page of your search.  Opera will fill out the user name and password for a particular web page automatically if you like with their Password Manager.

You need a Dictionary, an Encyclopedia, or to Translate a word into another language, select the word, and right click, and select what you want to do.

If you close some of the tabs you had open and closed the wrong one by mistake, no problem, there’ a Trash can icon that keeps track of tabs you closed. You can also browse History Free if you prefer.

Have you ever wanted to find a particular word on a web page full of text. One way you could do this is with Alt-F then type in the word, Opera makes this a little easier with Find in page,  just type a period with your word, and it is highlighted on the screen.

Windows7 and Vista introduced Widgets for little applications you wanted on your desktop. There’s Opera Widgets that do the same thing in your browser window.

And now to features that I really like.   Google’s Chrome originally allowed you to type your search into the address bar.  They were the first, then Firefox followed, Opera has done them one better with a Quick Search.  You can type your search into the address bar, like with the other browsers, and in Opera you can assign a one letter url for the address bar.  Let me give you a couple of examples.  I want to search for a JavaScript book on Amazon, type “z javascript” in the address bar and you’ll go to Amazon books and the JavaScript books page pops up.  You can type “w php” and bring up the Wiki for php, or “e ipods” and bring up Ebay on the ipod page.   What’s nice is you can create your own custom key shortcuts also.   If you go to Amazon a lot this really simplifies getting to where you want to be.

And finally, Opera is starting to listen. I have said many times before that if Opera would put out some decent web development tools, I would give up Firefox for web development and use Opera full time.  With this release the Alpha of Opera Dragonfly is being released.  This will be a full-featured development environment allowing you to debug JavaScript, inspect the DOM, the CSS, network traffic and data stores with built-in remote debugging for mobile devices.  To view page source, go to page->Developer’s Tools->source, or validate, or Inspect Element. You can Inspect the element on the page with a right click of the mouse.   This is an Alpha version, some of the choices are not functional yet,  as to be expected with an Alpha release, like the color picker, but Operation Dragonfly, the equivalent to Firebug on Firefox, looks like it has the potential to out do Firebug in functionality once everything gets hooked up.

Opera, now that you are finally moving to be a full fledged web development tools, let me help you.   Things I missed in Opera Dragonfly for Web Development, that I want.  The F12 key to bring up the application, and put it back down, quickly.  The Inspect button in Firebug that allows you to search the screen for an element with your mouse.   Yes, Dragonfly does it with the right click, Inspect Element, but its not the same, or it’s not fully functional yet.  I’d like an Aardvark plug-in type of functionality where I don’t have to bring up Dragonfly to view the DOM element.  I want to see all the CSS affecting the page with file names, like Web Developer, View CSS, in fact the entire Firefox Web Developer plug-in would be nice.

Keep working!  Your doing great work. Your web development tools aren’t quite there yet, but I see you’re actively working on them, as you get closer and closer, you may win me over for Web Development, you already have for general web browsing.  For those who have not tried Opera, I recommend you try it out, you might like it.

Opera and Firefox release new Browser Versions – a Review

Posted by dale | Browsers,Software | Friday 12 February 2010 6:02 pm

Opera has just released version 10.10, today, and Firefox recently released version 3.6. Currently of the popular browsers, Chrome is the fastest, followed very, very closely by Opera, and Safari, with Firefox coming before Internet Explorer, but way back from the rest.

Chrome is fast, but the interface is different with its top line tabs and Omnibox combined search and browser address window. It takes getting use to, and I have not been using it, because it was not stable initially.

Internet Explorer is way behind in browser compatibility and speed, and is an after thought in my mind. When and if Microsoft ever gets up to W3C standards, decides to use web standards for determining box widths instead of their proprietary method, and passes the ACID3 test, I might consider it, but not before.

Safari is fast, and it looks nice, but they do this by pumping up the luminance or gamma of their colors from all the other web browser colors, so the browser colors look sharper. Unfortunately, I can’t use their colors system for development when I’m building for all browsers. I’ll leave the Safari browser to Mac Users.

Which brings us to Firefox and Opera. I use Firefox about 70% of the time, mostly because of its web development plugin tools. There are three plugins I recommend for web development: Aardvark, Firebug, and Web Developer. I use all three. This makes Firefox unique as no other browser has these tools. Consequently, it is my web development browser of choice. Yes it loads slow as molasses, but everything runs fine once its up. I had to wait until the Aardvark plugin was ready, but now I’m up and running on 3.6.

What’s with 3.6? Firefox claims speed improvements in page loads, and it looks like this is true, it’s much faster loading both pages and booting, but still doesn’t seem up to the other fast browsers. Last release Firefox reached a 93 on the Acid 3 test, but rather jerkily. It now reaches 94 smoothly, still not 100. You now have type ahead in the address bar, which they call the “Awesome Bar.” Just start typing the site name and possible sites are gradually filtered to give you the correct URL. This is a rip off of the Chrome Omnibox, but there search capability is limited compared to Chrome. You now have one click bookmarks by clicking the star in the “Awesome Bar” window, and there are bookmark tags, like Delicious. Type a tag in the “Awesome Bar” and all your tagged items URL populate. This does not yet synchronize with your other Firefox browsers. They now have a Private Browsing option you can toggle. I’m skeptical of this, as Google keeps a complete record of all your browsing and your searches in its database. For looks, they have 35,000 personas which changes the look of the browser, to me this is just fluff.

And now to my favorite browser, Opera with its new 10.10 release. Opera is fast, and looks great. Only about 2% of the population uses it, so there is very little problem with malware, or virus attacks. It’s safe, secure, meets W3C standards, and passes ACID 3 quickly with flying colors. It’s a great browser. If it had the Internet tools of Firefox, I’d never look back and use Opera full time.

With Version 10.10 Opera claims five things that you can only do in Opera: Application sharing of data with others, compress web pages to load pages faster for people with slow data connections, visual tabs where you see a thumbnail of the web page, in addition to the text tag of the tab like in other browsers; customize your web page thumbnails in the speed dial window, synchronize your tabs, bookmarks, and other data with your other Opera browsers over the Internet. This is like Delicious in its synchronizing. Opera also has integrated themes for looks, and an integrated Opera mail program, although I admit, I prefer Thunderbird at the moment.

If you’re a die-hard Firefox user, you’ll like the improved Firefox speed and tags with the Awesome bar. If your not into web development, I highly recommend you download Opera and give it a test drive, check out the speed, convenient surfing tools, and overall good looks. Change the appearance in tools->appearance, drag the tag bar down to see the visual tabs, and enjoy Opera.

Passing Variables – PHP Cookies

Posted by dale | Browsers,PHP,XHTML | Saturday 6 February 2010 12:29 pm

Before we set some cookies, let’s look at the flow of messages and responses between your computer, and the server, where the web pages are stored. When you click on a link to go to a web site, your browser sends a “HTTP Header” request to the server for that web page. The Header message is variable in length and can get lengthy. The browser sends the HTTP Header, then waits for the server to send a “response header,” followed by the web page. How does the server know that the browser’s Header message is complete so it can respond? A blank line is sent at the end of the HTTP Header. The server when seeing the blank line responds with a “response header,” before passing the page.

Why am I going through this? Because the event that passes the communication baton from browser to server, and back again is a “blank line.” When you pass a cookie to a browser, it is attached to the server’s “response header”, but if a blank line shows up in the web page, before you tell the server to attach the cookie to the response header, you’ll get an error message, something like, “Warning cannot modify header information – headers already sent...” In other words, your command came late, the headers already gone. This can drive you nuts trying to figure out where the bug is in your code, if your not aware of what’s happening. The first thing you want to avoid is a blank line, or even a space at the top of the file before the PHP start tag.

The first step in setting a cookie is to tell the server to attach the cookie to its response header. This is done at the very top of the web page, before any blank lines, or “HTML” or “head” tags, with PHP’s “setcookie” function, like this:

<?php
setcookie( 'message_1', 'I am loaded and ready for bear');
?>

The “setcookie” function can take up to six parameters:

1. “Name”, the name of the cookie, a string, in this case: ‘message_1′ ;

2. “Value”, the value of the cookie, can be a string or number, in this case: ‘I am loaded and ready for bear’ ;

3. “Expire”, when the cookie should expire on the user’s browser. This is expressed in seconds, in linux system time based on seconds since January 1, 1970. I suggest you use a PHP time function, and add to it the number of seconds you’d like the cookie to be active in the browser, or use the browser default, since I’m using Firefox, the browser default is 90 days;

4. “Path”, the path on the server where the cookie will be made available. There’s a lot of files on the server, default is the current path;

5. “Domain”, the domain or url for which the cookie will be available. If you have multiple servers serving pages, on which server will cookie information be made available. The default is the current server.;

6. “Secure”, if you only want the cookie to be sent over a secure connection, like “https://”, set it to “1,” if it’s to be secured, the default is “0,” not secure.

Cookies exist in pairs, a name of the cookie, and its value. The other four parameters are usually not sent, the defaults are used. Normally, only two parameters are passed, name and value.

When your browser receives the cookie from the server it stores it in a set file location on your computer, depending on the browser. When you access that web site again, the browser, if there is a cookie available for that web site, attaches to to the HTTP Header it sends to the server. Cookies are a two-step process, you send it first to set the cookie, and then to get the cookie back you have to ask for the page again.

Ok, we’ve set the cookie in the first response header from the server, how do we get the cookie back from the browser. Well, the cookie, when it comes back, is attached to the HTTP Header, how do we read it? Assuming you’ve refreshed your browser, or asked for the page again. Here’s a block of code to do just that,

// Always check to see if the cookie exists,
// or was not deleted by the user
if (isset($_COOKIE['message_1'])){

   echo "The cookie is loaded: " . $_COOKIE['message_1'] ;
}

If the cookie exists and is set, this will echo: “The cookie is loaded: I am loaded and ready for bear

You also can set cookies in an array. Here’s an example with the cookie’s expiration time set to 10 days :

setcookie ( "myarray[one]" , "My " , time()+ 60*60*24+10 );
setcookie ( "myarray[two])" , "Funny " , time()+ 60*60*24+10 );
setcookie ( "myarray[three]" , "Valentine ", time()+ 60*60*24+10 );

To retrieve this array, we use a loop thus:

if ( isset($_COOKIE['myarray']) ) {
   foreach ( $_COOKIE['myarray'] as $note ) {
      echo $note ;
   }
}

And the output is: “My Funny Valentine“. And finally you can change a cookies value by calling setcookie() again, or delete the cookie by specifying a time in the past, thus: setcookie( “x”, “” , time() – 3600 ) will delete the cookie.

I mentioned cookies are public. Although, you can not look at them directly with a regular text editor, like notepad, and they can be encrypted, there are cookie management editors you can download to read cookies, and there are TCP/IP tools that you can use to watch the traffic go back and forth to a web site including the cookies with their names and values. Cookies can be useful, just be careful how you use them, and what information you store in them.

Cookies – an Introduction

Posted by dale | Browsers,PHP,XHTML | Friday 5 February 2010 2:25 pm

Cookies, cookies, cookies, we’ve heard about cookies now for many years, the perenial red herring, used like the threat of a nuclear bomb, to strike fear in the hearts of all who used a personal computer to surf the Internet, maybe not quite that forceful, but never in a favorable light. Cookies were started by Lou Montulli of Netscape in 1994, and they were first used by Netscape to see if a visitor had previously been to their site. Besides the Netscape browser, they were next supported in release 2 of Internet Explorer. Every browser since then has supported cookies. The general public first became aware of cookies early in 1996, and has been suspicious of them ever since then.

Cookies are bits of text information stored on your computer from a site you have visited on the Internet. They are stored in a different folder on your computer depending on what browser you are using, and if you surf the Internet a lot, you can amass quite a few of them. If cookies have such a bad reputation, one has to ask, why do all browsers support cookies?

Cookies offer web site owners and you several advantages. When your browser stores bits of text information from a web page on your computer, it allows the web site to know what page you’ve visited, and choices you’ve made on that page. For example, cookies can keep track what items you have selected in a shopping cart, and keep the list for you, even if don’t return to the site for a couple of weeks or even years, if the cookie is still on your computer. Another example is saving your login information so you don’t have to login every time you return to the site. If you have ever returned to a site, and gotten a “Welcome back, Frank” type of message, you can thank cookies.

For marketing cookies can be used to see what pages you have visited on a web site, the domain or page URL can be stored as you visit every page. Thus was born the often dreaded “DoubleClick” cookie, which can track your Internet usage from one site to the next site and gather a history of your web usage. Some consider this malware, adware, or spyware, whatever you want to call it, and they use programs to remove all the cookies on their computer to “protect” their PC.

And there lies some of the problems with using cookies to retain data. Although cookies are specifically linked to the user, his computer, and his particular browser, they are still, by many, considered to be malware, because they can pass your personal web usage history to marketing organizations, even though, it may seem anomynous, it’s still your history being passed. Cookies are not secure from others, which reminds me to warn you against putting any sensitive user information in cookies. They can be viewed by others.

Users delete cookies with cleaning and malware programs, or by disabling cookies in their browser, because of this, as a way to save information beyond the current session, cookies are unreliable for storing information, and inconsistent in storing information from one user to the next. Besides for marketing reasons, cookies are mainly used to retain user information on a current session. Instead, most websites require a user to log in, and by doing this, the user’s information is retained on the server, instead of on the user’s computer, a safer and quicker way to retain information from one web page to the next, especially for ecommerce.

Nevertheless, cookies can be useful, in retaining information about the user that is non-personal, like your favorite color, or the language you speak, and they can retain this information for a fairly long period of time, thus, they are still in use some 15 years later. Are purpose is to show how to use cookies to store information, which we’ll address in are very next post.

Next Page »