Astro Lesson #14 : handsome.hints
Gathering the goodies of the internet is a bit like picking strawberries
down at Auntie Mavis's farm - No matter how many you pick, you'll
always find a juicier one a little down the path. Here are some
of ReTroGrrl's juicy picks ...
catching.the.cache.caching
Browsers are greedy little things - they like to hang onto copies
of web pages for as long as possible and they seem to think the
oldest version of a page is the best one to keep. If you would like
to force that old browser to throw away old versions and always
load the latest one available you can! Here's how ...
Using the Marvellous Meta Tag (see previous lessons) do thusly
-
<META http-equiv="EXPIRES" CONTENT="TUES,
31 DEC 1996 12:00:00 GMT">
How does it work? It is simply fooling the browser into reloading
a given page from the server as the date it reads (1996) is old.
Of course, browsers can be configured to always check for the newest
versions of a web page - but not everyone knows this. This particular
tip is most useful when used with pages that are constantly updated.
Sometimes if this does not appear to be working you need to use
the pragma tag as well - email us if you want it.
artful.animations
Here's a clever trick - how to make a moving animation appear to
run over the top of text.
It's really an illusion created by making the background from the
text - use a graphics program to create this, and make the text
slightly oversized. Then use a table to place the animation where
you want it to start running. Simply make sure that the background
color of the page is the same as that of the text image and it will
appear seamless. You could even create a large table - set the background
of the table as the text image, and the animation as the image inside
the table. Cool, huh?
tip.top.searchers
Want to add your page to the best search engines? Seen those services
that offer to add you to 'hundreds' for a fee? According to www.searchenginewatch.com
these are the only ones you really need to worry about as they are
the most popular ...
- Northern Light
- Lycos
- Infoseek
- Alta Vista
- HotBot
- AOL NetFind
- Excite
- LookSmart
- Search.Com
- Webcrawler
beat.the.browser
Back to browsers again - they seem to think they need a little more
room than they are entitled to! It seems that they add a little
extra space around the margins of your web page for no particular
reason. You can beat this by specifying the following in the body
tag ...
<body marginwidth="0" marginheight="0"
leftmargin="0" topmargin="0">
The first 2 take care of Netscape Navigator and the next 2 look
after Microsoft Explorer (apparently this is applicable to versions
4.0 and above and in frames)
elective.subjective.email
Sometimes your emailing address might be available from a number
of locations - maybe different web pages. It is useful to have some
idea where the email is originating from and so the following is
useful.
<a href="mailto:retrogrrl@bigpond.com?subject=How
to force an email subject">
Easy. It simply presets the subject line in an email message. For
instance, if the email link is available on different pages the
subject can be set differently on each one. This should work with
the latest browsers - but at least it won't cause any problems with
the older ones.
free.frames.for.all!
We had a problem. We had made some lovely frames for our visitors,
with beautiful buttons and arranged our Space Station just to suit
these darlin' frames. But what happened to the gatecrashers, those
who came in by the back door - who found the URL of one of our pages
all by its lonesome?
If they clicked on the 'HOME' link they would be taken to the main
page - main.html - but not with frames. This is because frames are
controlled by a seperate HTML file (in this case, frame.html - we
try not to complicate things here at retrocity!). We made the link
to frame.html, sure, but then our little Space Cadets already using
the frames (having come in by the front door) would run into problems
if they clicked on any of these 'HOME' links - in fact, they would
find that frames.html would load up inside frames.html - ugh!
How did we overcome this? Simple. We set the 'HOME' link to the
following :
<a href="frame.html" target="_parent">
If the visitor was not in the frames already, this loaded the frames.html
URL which in turn loaded our menu bar and main page. If they were
already in frames - no problem, this loaded the frames.html over
the top of itself - problem solved!
You
can also use a small piece of javascript which checks to see if
the page is actually inside a frameset - if it is not, it forces
the frameset to take over. Email us if you want this script.
a.refreshing.change
Meta Tags again : If you came in by the front door you might have
realised that if you keep your pesky little hands to yourself, the
browser automatically loads the main page all by itself. This is
known as 'Client Pull' as it makes you do something that we want
you to do without you actually having to do anything .... get it?
(explain it to us sometime won't you?) This can be used to effect
for a number of reasons.
- If you need a page to constantly update itself - for instance,
stockmarket results
- If you have changed web address and want to forward visitors
to the new site
- Create a pseudo animation by changing to a number of new pages
in succession
- Just because you can!
Here's how ...
<META HTTP-EQUIV="refresh" content="10;url=http://www.users.bigpond.com/retrographix/frame.html"
>
Where 10 is the number of seconds before the new page is loaded, and
the www etc is the address of the new page ... if you want the page
to reload itself, then obviously specify it's own URL.
a.notebook.a.day.keeps.the.brain.from.hurting.itself
Retrogrrl advises you to keep a little notebook handy for jotting
down such things as the above. How many times have you spotted a good
idea only to need it 3 weeks later and you can't remember where you
saw it or how to do it? Retrogrrl keeps her little book close by at
all times.
Ah, so much to learn. so little time.
Go away now and delve into these doodlings - and look forward to next
time when we discuss - well, something ....