Category Archives: Internet

Things on the ‘net.

Internet Explorer (IE) Not Submitting Form on Enter

While working on a ColdFusion application, I noticed that the login form was not submitted when enter was pressed in Internet Explorer. Other browsers, Firefox and Chrome specifically, did not have this issue. There are many methods used to fix this error if you Google it, but I found that the simplest solutions are usually the best. No javascript, no funky CSS to hide fields, yada, yada, yada.

The Situation

This app had a form with a single text field and a submit button. The form submitted back to its own page were the logic executed if form.submit (the submit button itself) came back with the form variables collection.

When you pressed the enter button, IE did not send the input type=submit field back with the form vars and the form logic did not execute. The page appeared to refresh and you started over again.

The Solution

All that was necessary was to add a hidden input field that the form logic used instead.

<input type="hidden" name="login" value="loginSubmit" />

If form.login and form.login = ‘loginSubmit’, the form logic executes and the user is logged in.

So, from now on, I am not going to rely on the input submit button to check for form submission. Call me crazy, but I think IE has the right idea here; the input submit should not be part of the form variables collection.

Test Drivin’ Safari 4

I gave Safari 4 a whirl on both Mac and PC. I like it. It brings much of the cool stuff from iTunes into the browser. Cover flow is fun and fresh in a browser. The Top Sites with the page previews is an upscale rip off of Chrome and, really, it’s a good feature for any browser.

Cover Flow
Safari Cover Flow
Top Sites
Safari Top Sites

Safari 4 is great for casual browsing and general perusing of the code but web development work stills needs the robustness of the Firefox plugins. Firefox is so ahead of the curve for web developers and I’m so used to it’s fantastic toolbars and debuggers that I don’t know if anyone will catch up. Granted the Safari 4 Web Inspector on the pre-packed Developer toolbar is nifty. Gotta love the ‘Resources’ tab. Nice visual of the weight of each loaded item. The included scripts debugger is handy and a much needed accessory in every browser.

Did I mention Safari 4 is fast? It is. That my biggest complaint with Firefox. It can be slow to render. Maybe that will improve with FF 3.5. Still, the trade off at this point is worth it. Bottom line is Safari 4 is great for browsing and the Web Inspector is a must ‘once over’ tool for developers.

FYI, Lifehacker has a great article on the latest browser speed tests.

3 Steps to Remove Pages and Cached Content from Google Search

Google’s indexing of websites for its search is quite good, quite fast, and quite thorough. There are times, however, that pages on a site should not be indexed. For example, admin sections or include files. Asking Google to remove content is easy and Google’s response is reasonably fast.

If you don’t own the website that has the material that needs to be removed, don’t bother reading any further. Contact the website responsible for posting it and ask them to remove it.

Cached content is handled through Webmaster Tools. To remove cached content all the steps below are required.

It should be noted that you can could add a meta tag to pages that should not be indexed as such:

<meta name="robots" content="noindex">

or for Google only

<meta name="googlebot" content="noindex">

And for cached pages:

<meta name="robots" content="noarchive">

or for Google only

<meta name="googlebot" content="noarchive">

The meta tag method can be tedious for a large number of files and there is no direct feedback from Google on the removal. For expedited removal and assurance from Google that it has been removed from the search results, follow the steps below.

A note about removing non-HTML content from Google:

If the changed content is not in (X)HTML (for example if an image, a Flash file or a PDF file has been changed), you won’t be able to use the cache removal tool. So if it’s important that the old content no longer be visible in search results, the fastest solution would be to change the URL of the file so that the old URL returns a 404 HTTP result code and use the URL removal tool to remove the old URL. Otherwise, if you chose to allow Google to naturally refresh your information, know that previews of non-HTML content (such as Quick View links for PDF files) can take longer to update after recrawling than normal HTML pages would.

Step 1: Webmaster Tools

Sign up the site for Webmaster Tools. Webmaster Tools is easy to set up and provides valuable information on Google’s indexing of your site. There are also tools to help you create the robots.txt needed for step 2.

Step 2: Robots.txt

Create a robots.txt file and place it in the root of the website. There are two rules that should be applied in the robots.txt:

User-agent: the robot the following rule applies to
Disallow: the URL you want to block

User-Agent

User-agent allows for the specific selection of search engine robots.

For all search engine bots, the user-agent will be:
User-agent: *

For Google bots use:
User-Agent: Googlebot

All rules under the User-Agent apply to that User-Agent. You can specify rules for individual User-Agents and list them on the same robots.txt.

Disallow

Disallow blocks certain sites, directories, pages, images, or file types.

Block entire site:
Disallow: /

Block directory:
Disallow: /junk-directory/

Block page:
Disallow: /private_file.html

Block specific image from Google image search:
User-agent: Googlebot-Image
Disallow: /images/dogs.jpg

Block all images on your site from Google image search:
User-agent: Googlebot-Image
Disallow: /

Block files of a specific file type (for example, .gif):
User-agent: *
Disallow: /*.gif$

A sample robots.txt to block all files in an include directory might look like this:
User-agent: *
Disallow: /includes/

Rules on the robots.txt can be stacked and as specific as you want. For example, to exclude a directory and file from all search engine bots and images from Google:
User-agent: *
Disallow: /includes/
Disallow: /admin.html

User-agent: Googlebot-Image
Disallow: /

All rules below a User-Agent declaration apply to the User-Agent specified only.

Step 3: Remove URLs/Cached Pages

In Webmaster Tools request the removal of URL from their index. On Webmaster Tools new interface Remove URLs is under Site Configuration, Crawler Access. For the old interface it’s under Tools, Remove URLs.

Select whether URLs, directories/subdirectories, entire site, or cached copies should be removed. Hit “Next” and put in the URL. If you are removing a cached copy and the page still exists, you will need to add a noarchive meta tag.

<meta name="robots" content="noarchive">

If the page no longer exists, select “This page has been modified so that it no longer contains the information that is being cached.”

The removal will be listed as pending until Google successfully removes it. If for some reason it can’t remove the URLs, Google will list the error on this page. Google can remove the URLs in a matter of hours if done correctly. Keep in mind that Google’s documentation states that it can take 3-5 days.

Other search engines will respect the robots.txt but to varying levels. No two search engines are the same and neither is their handling of the robots.txt.

Latest mag obsession “Practical Web Design” aka “.net”

I have to hand to the Brits; they are into web design and standardization like nobody’s business. Web design and development is a moving target. I have been to the expensive conferences and events. Loads of great and inspiring info. Problem is you need something that you can refer back to and use as a resource. And, something that is here and now, tangible, tactile, and moving as fast as web evolution itself. I’m talking mags.
.net mag
I got my hands on a copy of the UK produced and published “Practical Web Design” (known as “.net” in Great Britain) magazine at Borders and have read every word twice. It’s like carrying around the enthusiasm and electricity of a conference in my pocket(book). This is what web designers need. A constant flow of practical and applicable information. It keeps you motivated and relevant. It doesn’t hurt that I have met many of the contributors and advisory panels members at the aforementioned conferences. They are picking the top and, IMHO, the most credible talent to fill the pages.

Now for the bad news. It’s expensive here in the US (over $130/yr) at the current exchange rate. I’ll keeping picking it up a copy at a time to spread out the pain, but I love it anyway.

Getting Flocked: Web Mail Notifier

Still Flocking with this browser, I’ve had a chance now to get to know the web mail notifier feature. First off, I love the easy set up. As soon as you log into your web mail, Flock asks you if you would like to save the settings in the browser. A click or two later and you’re done. You can have multiple accounts loaded in, but only one default at a time. The absolute best feature is the ability to use your web mail straight away when you click on an e-mail link. Remember how you used to have all your web mail settings, POP and SMTP, all set up in a separate e-mail application then, when you clicked on an e-mail link, that app would then have to load on top of everything else. What a pain. No more. How sweet.

Now for the gripes…Flock doesn’t check the web mail for new messages when I load the browser. I’ve looked around at the settings, but I can’t get it to check the instant the browser loads unless I click on it to tell it to. I want less clicks, not more.

That being said, it still super convenient especially when you have several web mail accounts. I also like the one click to compose. That’s bitchin’ nice.

Tags: , ,