Javascripts & Sym Links vs. Cache Engines & Proxy Servers

Javascripts & Sym Links vs. Cache Engines & Proxy Servers

Post by Dan Poyn » Sat, 24 Jul 1999 04:00:00

I think of the cache engines like robots, but they don't seem to obey
robots.txt rules. It's annoying me and my server stats that they are not
recognizing my symbolic links like a browser does and are attempting to
read my Javascripts links out of context , thus running amok looking for
non existing documents and causing thousands of unnecessary lookups on my
server each day.

I'm rotating my web site content by changing a symbolic link, named
"current", to a different directory (slideshows/dir0100/,
slideshows/dir0200/, ...) each hour.

On my index.html when a user clicks to enter the "current" content
directory they load current/index.html which has a Javascript function
which looks something like this:

function runShow() {

To avoid current/index.html from being cached, so users see the new
content, I use that path:
"../slideshows/dir1000/01.html" in the scripts, which is backing up one
level from the "current" directory and looking in the appropriate
slideshows subdirectory for content pages.

Otherwise placing <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> before my
Javascripts in the html pages doesn't help. I'm not aware of any equivalent
no-cache command I might use in the actual Javascript <script> tags

When the page loads in a web browser it thinks it's looking at a directory
named "current" and everything works great. I've tested this on multiple
platforms with various browsers to insure compatibility. So it's not a
WebTV thing or something like that.

It seems the cache engines break out of my symbolicly linked  "current"
directory and I see lots of requests in my Apache error_logs to load things
[Fri Jul 23 15:58:06 1999] [error] [client] File does not
exist: /home/httpd/
[Fri Jul 23 15:58:12 1999] [error] [client] File does not
[Fri Jul 23 15:58:21 1999] [error] [client] File does not
which adds a lot of unnecessary traffic trying to find pages such as:

specs: Linux RH5.2 server with Apache 1.3.6.

Any thoughts to avoid such problems would be much appreciated.