Fifteen Easy Things to Make Your Website Better - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Fifteen Easy Things to Make Your Website Better

Description:

Place the favicon.ico file in your domain's root. Reference it in your html code via meta-tag. ... images/shared/download_buttons/get_adobe_reader.gif. 1/24/07 ... – PowerPoint PPT presentation

Number of Views:211
Avg rating:3.0/5.0
Slides: 23
Provided by: donarro
Category:

less

Transcript and Presenter's Notes

Title: Fifteen Easy Things to Make Your Website Better


1
Fifteen Easy Things toMake Your Website Better
  • PHP overview
  • Schedule content to appear
  • More secure Contact Us page
  • Include files
  • Test your PHP pages locally
  • Search page for your site
  • Use .htaccess to add features
  • What server are you using?
  • Favorite icon
  • Robots.txt
  • Sitemap
  • Keywords
  • No counters
  • Custom error messages
  • RSS Feed
  • PDF Formatted Documents

2
Favorite Icon
  • Adds a distinctive icon in a visitor's Favorites
    list and/or next to the address box in his
    browser.
  • There are differences between IE and Firefox.
  • Place the favicon.ico file in your domains root.
  • Reference it in your html code via meta-tag.
  • Online generator with FAQ http//www.favicon.com/
  • Bitmap to Icon Generator
  • http//www.qtam-computer.com/bmp2ico35.shtml
  • PCMag utility Iconedit32
  • Validate your favicon configuration
  • http//www.html-kit.com/favicon/validator/
  • Having the file eliminates 404 errors in your
    site log.

3
Robots.txt
  • Tells (well-behaved) web spiders which pages to
    index and which pages not to index on your site.
  • One way of not having information indexed that
    changes often.
  • Another way of providing some privacy of personal
    information (e.g. a member directory).
  • Add the file to your domains root directory.
  • FAQ http//www.robotstxt.org/wc/faq.html
  • Google has a verification tool
  • http//www.google.com/support/webmasters/bin/answe
    r.py?answer35237topic8475
  • Having the file eliminates 404 errors in your
    site log. It can eliminate other 404 errors from
    protected areas.
  • If you cant place robots.txt in your root, there
    are meta-tags that work similarly name"robots" content"noindex,nofollow" /

4
Sample robots.txt file
  • Robots.txt file
  • Bans access to Members' Area
  • User-agent
  • Disallow /Member_Center/
  • Disallow /phpmyadmin/
  • You can see any sites robots.txt file by asking
    for it at www.site.com/robots.txt.

5
Sitemap
  • Tells Google, Yahoo!, Microsoft, and others what
    your site looks like so they can index it better.
    More info is at sitemaps.org
  • Various formats can be used. See
  • http//www.google.com/support/webmasters/bin/answe
    r.py?answer34654
  • Simplest is a text file with a list of your
    individual page URLs. The file is stored in your
    domains root.

6
Keywords
  • Add keywords to your pages to get better page
    ranking by search engines.
  • http//www.searchengineguide.com/keywords.html
  • Add keywords inside meta-tags in your html code.

7
No Counters
  • If you dont or cant use your hosts counters,
    the free ones may subject you to more SPAM,
    unavailability, etc.
  • Dont use counters. They look ancient plus they
    dont provide you with any sense of when, who,
    and what.
  • Use your hosts statistics page if one is
    available.
  • Or, get your log files and analyze them yourself
    with Analog. Many hosts use this program but if
    you run it locally, you can select from its (too)
    many options to get just the report you want.
    Its very fast once it has done reverse-IP
    lookups.
  • http//www.analog.cx/
  • Analog also lets you see which browsers your
    guests use, which terms search engines used to
    find you, etc.

8
Custom Display for Page Errors
  • Adding custom files can give error display pages
    the same look and feel as the rest of your site.
  • Host-dependent feature. If you are hosted on an
    Apache server, the administrator must configure
    it.
  • Check your host documentation for default names
    e.g. E404.html for Page not found and E401.html
    for Authorization required.
  • You may be able to control the file names and
    locations with an .htaccess file in your root
    directory.

9
RSS Feed
  • Lets people keep track of updated pages at
    multiple sites without having to visit them all
    with a browser.
  • Various ways to read RSS IE7, FF, My Yahoo,
    FeedDemon. I Use RSS Bandit
  • http//www.rssbandit.org/
  • RSSBandit can use a remote store to sync mult.
    PCs
  • The feed file is usually an XML file that you
    reference in your home page.
  • I use ListGarden to generate the feed. It works
    through your browser, can also generate an html
    version of the feed file, has a backup feature,
    etc
  • http//softwaregarden.com/products/listgarden/

10
PDF Formatted Documents
  • No worries about whether visitors have Word or
    which version of it PDF provides consistent
    formatting.
  • If you dont have Acrobat, use free software to
    generate PDF documents. These install a virtual
    Windows printer that lets you directly generate
    the PDF files from any Windows program. Some I
    know of are CutePDF and pdfCreator. I use the
    paid version of pdf995
  • http//www.pdf995.com/
  • Put a link on your pages to let visitors get
    Acrobat Reader from Adobes site
  • http//www.adobe.com/prodindex/acrobat/readstep.ht
    mlreader
  • Button is here
  • http//www.adobe.com/images/shared/download_button
    s/get_adobe_reader.gif

11
PHP Overview
  • PHP is available on most paid hosting plans where
    the host is running Linux. Its usually not
    available with free hosting or your ISPs web
    space.
  • PHP Processor runs in either interpret mode or
    bypass mode.
  • PHP defaults to bypass mode. You have to insert a
    command to start it interpreting. This allows you
    make graceful additions of PHP code for
    specific purposes rather than re-writing an
    entire page and learning the entire language.
  • FrontPage can be told to edit .php pages as it
    does .html pages (WYSIWYG code).

12
Schedule Content to Appear
  • Use PHP to change the content of a page depending
    on the time and/or date. E.g., make a special
    offer available only until a certain time, change
    a contact email address during weekends, remove
    an announcement after an event ends.
  • You dont have to be online to make the change
    happen at the appropriate time.
  • Since the code is in PHP on the server, unlike a
    method using Javascript, the user cant see the
    hidden code by viewing the source.

13
Sample scheduling code
  • removeDate mktime(0,0,0,3,12,2006)
  • date getdate()
  • now mktime(0,0,0,date'mon',date'mday',da
    te'year')
  • if (now
  • ?
  • All HTML here will only appear prior to
    3/12/06
  • ?

14
A More Secure Contact Us page
  • Use PHP to hide email addresses from the spammers
    trying to harvest them.
  • Allows you to add CAPTCHA code to stop comment
    SPAM.
  • Allows you to verify form data, send a form to
    multiple email addresses, etc.
  • Depending on your host, sendmail() may not be
    available or there may be restrictions like
    forcing the From address (e.g.
    webmaster_at_yourdomain.com)
  • You can add a Reply-To address (or other
    headers).
  • If no PHP, use Natata Anti-Spam Encoder to hide
    addresses
  • http//natata.hn3.net/antispam_encoder.htm

15
Include Files
  • Consolidate all of your headers, navigation, and
    footers in one (or more) files using a PHP
    include statement(s).
  • Editing that one file changes the appearance on
    all of your web pages (that use that file).
  • You can also set variables to modify what gets
    included.
  • Use SHTML Includes if you dont have PHP
    available.
  • SHTML Includes wont be available if the
    administrator has disabled (or not enabled) them.

16
Sample include file
  • Page.php
  • page_date "02/14/07"
  • include ('/header.inc')
  • ?
  • . . Content here . . .
  • include ('/footer.inc')
  • ?
  • Footer.inc
  • font-style italic"
  • Please report problems with this
    page to
  • webmaster
  • Revised

17
Test Your PHP Pages Locally
  • Add a local web server with PHP support to let
    you test your PHP code without uploading it to
    your host.
  • Try WAMP, a free package of the current versions
    of Apache, MySQL, and PHP for Windows
  • http//www.wampserver.com/en/
  • Apache needs to know where your files are.
  • To allow other PCs on your LAN to access the web
    pages, WAMP needs to be set Online and your
    firewall opened on the httpd port (usually 80).
  • Your local WAMP may have a different version of
    PHP from your web host! Make sure you dont use
    incompatible code.

18
Search Page for Your Site
  • Why spend a lot of time trying to code a search
    function for your site when Google will do it for
    you.
  • Start here http//www.google.com/services/search.
    htmlutm_mediumetutm_sourcebizsolsutm_campaign
    web_site_searchE
  • The code is here http//services.google.com/searc
    hcode2.html?acceptonboth
  • If Googles not already indexing your site, why
    not? Submit your URL here
  • http//www.google.com/addurl/?continue/addurl

19
Use .htaccess to Add Features
  • Works with Apache, not IIS. Even on Apache the
    host administrator may have disabled it.
  • A text file that you place in your domains root.
  • Can include additional MIME file type support,
    password protection, and alternate error message
    files among others.
  • http//www.freewebmasterhelp.com/tutorials/htacces
    s/

20
Sample .htaccess file
  • AddType audio/x-ms-wma wma
  • AddType audio/x-ms-wax wax
  • AddType audio/x-ms-wax wax
  • AddType audio/x-ms-wmv wmv
  • AddType video/x-ms-asf asf asx
  • AddType video/x-ms-wvx wvx
  • AddType video/x-ms-wm wm
  • AddType video/x-ms-wmx wmx
  • AddType application/x-ms-wmz wmz
  • AddType application/x-ms-wmd wmd

21
What Server Are You Using?
  • Use ViewHEAD to identify your hosts server and
    version.
  • http//www.pc-tools.net/win32/viewhead/
  • Reports the headers that the server sends in
    response to a HEAD request. These headers can
    include the remote server's software, remote time
    and date, the MIME type and size of a file, and
    various other pieces of information.
  • Microsoft has a free WFetch program with even
    more features.
  • For deep investigation, Wireshark is available to
    look at the actual bytes sent and received via
    your network interface. Complex filters can be
    set.

22
Contact info
  • Don Arrowsmith
  • Don at ArrowsmithFamily d0t com
Write a Comment
User Comments (0)
About PowerShow.com