Webmaster Tips,
Tricks and Strategies
AUTOMATING DOWNLOADS WITH ZIP
FILES
If you want to send a document to another person via
http download, you can easily do this by giving your file a non-html extension.
For example, if you have a Word Document brochure you wish to give your
visitors access to, instead of coding the hyperlink to a ".doc" file, you
can zip this file and then your HREF tag will automatically start downloading
the file.
Just about everyone these days has the ability to extract
zip files, so this is a great tool for letting people download files from
your site that would normally appear in html format. For example, images,
text files and certain Microsoft application files will display in the visitor's
browser, which will be exactly what you don't want if downloading is your
goal.
Using zip files will give your visitors a quick method
of retreiving and storing files from your site. Of course, using this
method means you can add many files to a single zip. You can even zip up
your entire site (great for tutorials and other "how-to" sites) and let your
visitors browse off-line without incurring charges or tying up their phone
lines.
AUTOMATING BOOKMARKS
Have you ever seen a button or text link on a site
that lets visitors automatically bookmark a site? It's a simple procedure
if you have the right tools, so let's get started. First off, for anyone
who doesn't know, bookmarks or favorites are sites that have been stored
by the user for quick retrieval. Bookmarks are usually made by selecting
that option on your browser. But you can automate this process and (hopefully)
incite your visitors to bookmark your site with a simple mouse-click. Here's
how it can be done.
We use the following JavaScript to peform these actions.
The first variable (bookmarkurl) is the URL to the site, while the
second variable (bookmarktitle) is the actual pre-coded entry that
the browser will display.
Place this script in the HEAD Section of your
Page:
<script language="JavaScript1.2">
<!-- Start
var bookmarkurl="http://www.bravenet.com/"
var bookmarktitle="Bravenet.com - Free Tools for
Webmasters"
function addbookmark(){if
(document.all)window.external.AddFavorite(bookmarkurl,bookmarktitle)}
// End -->
</script>
Now we call the script to actually place the link.
This second part of our script should be placed exactly where you want the
link to display:
<script language="JavaScript">
if (document.all)document.write(' Bookmark
Now!')
</script>
NOTE: The above script works only in Internet
Explorer. If you want Netscape users to
bookmark, you'll have to do something a little differently. Here's a
solution provided by a Bravenet Member (thanks Yousuf!). This script
places a text message in place of the bookmark link for Netscape users. This
is a tidy script you can place in one spot, where you want the link (or message)
to appear.
<SCRIPT language="JavaScript">
<!-- Begin
<!-- Script By Yousuf Imtiaz-->
if (document.all) { // Only true for MSIE
var url="http://www.bravenet.com";
var title="Bravenet.com - Free Tools for
Webmasters";
document.write('Bookmark Now!');
}
else {
document.write("Bookmark Now! (CTRL+D)");
}
// End -->
</SCRIPT>
QUOTATION
"It's like magic. When you live by yourself,
all your annoying habits are gone!"
-- Merrill Markoe |