Featured Posts

Our Life as We Know itOur Life as We Know it October marked the time when life, my life that is, turn upside down. Well, o.k. not really upside down, but it sounded good in my head. Can't you hear the symphony in the...

Readmore

Creating Fluid Web Pages using Image BordersCreating Fluid Web Pages using Image Borders This week I have been working on a redesign of one of my web sites. The design of the website was acceptable by my client, but the desire was to maintain the same look of...

Readmore

Link Exchanges/Link Farms - Good or Bad The other day, I received a very courteous email from a webmaster looking to increase the rankings of his web pages. I have spent the last few days contemplating his request. First,...

Readmore

Google's New CaffeineGoogle's New Caffeine I am a sucker for Google's search engine. I use it over any other. However, from time to time I do look at the others just to see if I am missing anything special. Usually,...

Readmore

TeacherTube ReviewTeacherTube Review As a web designer, I help clients with video uploads quite a bit. One network that I have been known to use for video uploads is TeacherTube.com. The rules seem pretty...

Readmore

Hafner Designs Rss

Difference between “text/javascript” & “application/javascript”

Posted on : 04-03-2009 | By : Heidi Hafner | In : Relocation, Web Design

Tags: ,

1

I learned something interesting yesterday. All these past years, when I have to use javascript in a web page, I have always put one of these as my link to my javascript inside my head tags:

script type=”text/javascript” src=”scripts/anyscript.js”
script src=”scripts/anyscript.js”

However, in my endeavors to write cleaner pages, use new code instead of obsolete or deprecated code, and also to learn Dreamweaver CS4, I set my tag to be:

script type=”application/javascript” src=”scripts/anyscript.js”

Usually I test all my pages before I let my clients know that they’re done… but this time I didn’t. Shortly after releasing them, I found that the javascript, which I use in many pages only worked in Firefox or Safari, but it did not work in Microsoft IE.

I went through all my code trying to figure out what the deal was… you know, looking for the proverbial needle in a haystack! Couldn’t find it. Finally, it occurred to me that I had tried this new thing that Dw offered, type=”application/javascript”. I quickly changed back to my tried and true, type=”text/javascript”.

Apparently, The W3C (HTML) specification suggests using text/javascript instead of application/javascript.

I found a post by Microsoft that says, “This is an expected by-design behavior. IE currently does not have support for these media types.” This was in reference to the media type of “application/javascript” or “application/ecmascript.”

Well, this web designer is sticking to the old tried and true “text/javascript” for now. No use making more trouble in my designs.

More later…

Technorati Tags: ,

Disable Indexing of Directories

Posted on : 03-03-2009 | By : Heidi Hafner | In : Web Design

Tags:

0

So you want to figure out how to disable any indexing that can occur on your web pages? Well, I hope to tell you, simply.

Have you ever gone to a website and typed in the wrong URL only to find a page with links to various folders? You know, one line says parent, another images, etc… I call this showing your underwear or letting your underwear hang out… Yeah! It’s embarrassing.

One day, many years ago, I learned the hard way that people could see what I had on my servers. They could browse all my file structures on my servers and copy whatever they wanted from my own server. They were able to see my “unmentionables.” It didn’t matter if I used a javascript to protect the images on a page, because they were not looking at the display page… They found my folder indexes.

It is sad but, truth. When people are offered easy access to files, they will take them. If they can get a glimpse of what you have on your servers, they can copy it.

There are a few ways that I have found that are easy fixes to hiding all my files and folders.

  1. You can put a blank file named index.html in each directory.
    I don’t like this method because I have a lot of folders and it just becomes a pain. The first thing I do when I hit a blank page is try to figure out why. I usually will try to “fix” the URL thinking I must of mangled it.
  2. Go into your cPanel, click on “Index Manager” and then begin going through the list of folders and mark them as “No Index.”
    What cPanel does with this process is write a line in a file called .htaccess. CPanel places that file in each directory (folder) on your server, but you have to go to each folder and click on it, click on its radio button to not have indexes and then repeat again with the next folder. So this is going down the right track, however, I have too many folders to do all this… haven’t you heard, “Time is money!” Do you have time to sit there and click on a radio button then click a link to go back up a level to go to the next? Hey, if you do, more power too you!
  3. Here is what I do. It is similar to option #1, but your viewer will get a different an error page instead of a blank. Create a file named .htaccess … It MUST have the [dot] in front of the word. The [dot] makes it invisible on your server. Inside that file type in only one line.
    Options -Indexes

    Then save this file and send it over to your server.

Using the third option has it’s benefits. By doing it this way all sub-directories of that directory will also get their directory listings turned off.

Now for the word of CAUTION!

There are many programs that access this .htaccess file regularly. Microsoft FrontPage Extensions, Blogs, Calendars, the list goes on, just to name a few. It is not advisable to change the .htaccess within the folders that are accessed by these programs. However, if you are determined and want to give it a try, then make sure you transfer the already existing .htaccess file from that folder to your computer… add the line to the top of that file, save and send it back to that same folder. More than likely though, these programs would probably overwrite that file anyway.

Good Luck!

More later…

Technorati Tags: