Preloading Images and External JS File

J

Jenny

Hi - I've inherited responsibility for our church's website. It has a
sizeable main menu, which uses mouseover image swaps. These images use a
pre-load script but the script is only included in the index.html page. My
javascript knowledge is weak, but it seems to me if a viewer arrives first
at page12.html, he gets no benefit of the preload script. My quandry -
Should I include the preload script on every page, or would this force each
of these images to download again everytime a viewer moves to a different
web page, thereby gumming up the whole works? If I don't add it to every
page, the viewer who enters thru a backdoor has a sluggish menu, right?

If the right approach is to include it on every page, can I do this with an
external js file? Will I need to call this file, or will it work just by
including the js statement in the <head> section:
<SCRIPT LANGUAGE="JavaScript" SRC="preloadscript.js"></SCRIPT>

Thanks very much for your help.
 
J

Joshie Surber

It shouldn't be any problem to include the file on every page. Yes, the
images will be placed into memory on every page, but they will not be
actually downloaded from the server every page -- they will be stored
in the user's cache. The same goes for the script file itself. Once the
information is on the computer, it will stay there until it is rotated
out of cache (which usually takes about four days for a heavy surfer
with a small cache.)
 
R

Randy Webb

Joshie Surber said the following on 10/16/2005 10:59 PM:

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.
It shouldn't be any problem to include the file on every page. Yes, the
images will be placed into memory on every page, but they will not be
actually downloaded from the server every page -- they will be stored
in the user's cache. The same goes for the script file itself. Once the
information is on the computer, it will stay there until it is rotated
out of cache (which usually takes about four days for a heavy surfer
with a small cache.)

No, the files will not always be kept in the cache. It depends on user
settings. I have mine set to "Empty Temporary Internet Files folder when
browser is closed".
 
J

Joshie Surber

Please quote what you are replying to.

why? if there is only one question to reply to, there is no point
reminding everyone what it is... it just wastes bandwidth.
No, the files will not always be kept in the cache. It depends on user
settings. I have mine set to "Empty Temporary Internet Files folder when
browser is closed".

true, but anyone who is knowledgeable enough to do that will be aware
(or should be) aware of the extra page load time, and has decided to
accept it. besides, it is still cached across the browsing session you
are in now, when you go from one page of the site to another.
 
R

Randy Webb

Joshie Surber said the following on 10/18/2005 9:37 PM:
why? if there is only one question to reply to, there is no point
reminding everyone what it is... it just wastes bandwidth.

Because most people in this group use a decent newsreader rather than
groups.google.com and in the process of doing that they do not keep a
perpetual archive of previous posts. So, quoting what you are replying
to - even if a single question - makes it a lot simpler to follow the
conversation.
true, but anyone who is knowledgeable enough to do that will be aware
(or should be) aware of the extra page load time, and has decided to
accept it.

That is not always true of the user though as the user is not always the
one who sets that preference. SysAdmins, Internet Cafe operators, etc...

besides, it is still cached across the browsing session you
are in now, when you go from one page of the site to another.

I never said it wasn't.

I said:
<quote>
No, the files will not always be kept in the cache. It depends on user
settings.
</quote>

I do not even agree with the statement that "it will stay there until it
is rotated out of cache" as IE is notorious for *not* doing that.
 
J

Joshie Surber

Please quote what you are replying to.
Because most people in this group use a decent newsreader rather than
groups.google.com and in the process of doing that they do not keep a
perpetual archive of previous posts. So, quoting what you are replying
to - even if a single question - makes it a lot simpler to follow the
conversation.

Well it seems to me that, given a protocol based upon conversation
threads, a "decent newsreader" would keep these threads together for
you, and given such, that excess quoted material just takes up too much
space.
<opinion type="personal" valid="true">
Part of why I have discarded the four or five newsreaders that I have
gone thru in favor of google groups is that google is the only one I
have found that is "decent" enough to group threads and hide all the
quoted cruft that litters usenet like empty beer bottles along a
highway.
</opinion>
 
R

Randy Webb

Joshie Surber said the following on 10/22/2005 7:33 AM:
Well it seems to me that, given a protocol based upon conversation
threads, a "decent newsreader" would keep these threads together for
you, and given such, that excess quoted material just takes up too much
space.

And I don't want to keep an archive of every post that is posted here
just so I can keep up with a conversation.
<opinion type="personal" valid="true">
Part of why I have discarded the four or five newsreaders that I have
gone thru in favor of google groups is that google is the only one I
have found that is "decent" enough to group threads and hide all the
quoted cruft that litters usenet like empty beer bottles along a
highway.
</opinion>

Then you need a different medium than Usenet.
 
D

Dr John Stockton

JRS: In article <[email protected]>
, dated Sat, 22 Oct 2005 04:33:40, seen in
Joshie Surber said:
Well it seems to me that, given a protocol based upon conversation
threads, a "decent newsreader" would keep these threads together for
you, and given such, that excess quoted material just takes up too much
space.
<opinion type="personal" valid="true">
Part of why I have discarded the four or five newsreaders that I have
gone thru in favor of google groups is that google is the only one I
have found that is "decent" enough to group threads and hide all the
quoted cruft that litters usenet like empty beer bottles along a
highway.
</opinion>

News is not a conversational medium. Participants in a newsgroup have
other things to do, and so desire to be reminded of what has gone
before.

Accordingly, the agreed standards have always been to quote as much of
the previous material as will indicate the context of the reply.

Accordingly, well-designed news software - which does not mean Web-news
- is generally able to move from one new article directly to the next,
with a single key-stroke or click; and many use it in that manner.

Accordingly, proper quotation, with adequate attribution, in the right
order, is what the regulars want; it is necessary that you comply with
that if you wish to avoid being seen as perverse, idle, egocentric,
etc., and to be considered worth helping.


NOTE that the convention is to quote ONLY those parts of the previous
article that are needed to put the current one in context. Quoting all
is acceptable if the previous article was short; but if the previous
article was long, one should only quote as a reminder, given that the
previous article is accessible.


Is anyone here good at Latin?
 
R

Richard Cornford

It looks like a request to provide some sort of attribution for those
quotes is also warranted. So to mitigate:-
Randy Webb wrote:

It doesn't waste bandwidth to provide a context for any reply made. It
is not often necessary (or desirable) to quote all of a post that is
being replied to. Indeed the 'correct' action is to trim quoted material
down to no more than is sufficient to provide a context for the response
given. This may, in many cases, be as little as a single sentence or
single line of code, depending on what it is that is being responded to.

It is also the case that news servers only store posts for a limited
period, which older posts being dropped (either on a time-limited basis,
or when a total number of posts is exceeded, or when a total size limit
is exceeded). And as a question must precede its responses it is
entirely realistic (indeed inevitably common) that a question may have
been dropped form a news server while its responses are still available.
Well it seems to me that, given a protocol based upon
conversation threads,

It would be more accurate to say "ephemeral conversation threads", as
long term storage and archiving were never part of the intention of
newsgroups (potentially useful as such may be in some contexts).
a "decent newsreader" would keep these threads together
for you, and given such, that excess quoted material just
takes up too much space.

Nobody is proposing "excess quoted material". The requirement is to
quote only what is sufficient to provide a context for the response
given. No more, but certainly no less. The benefits in not having to
look elsewhere, and reconstruct the context of a specific response from
the entire body of a post, far exceeds harm of the potential additional
bandwidth consumption.
<opinion type="personal" valid="true">

On the subject of communication that is one-to-many in nature the
opinion of an individual cannot outweigh the best interests of the many.
Part of why I have discarded the four or five newsreaders that
I have gone thru in favor of google groups is that google is
the only one I have found that is "decent" enough to group
threads and hide all the quoted cruft that litters usenet like
empty beer bottles along a highway.
</opinion>

Attempting to hide quoted material is one of the significant faults in
google's Usenet interface. It is inconvenient to continually be
expanding those quotes in order to see the context of a response, and
finding google treating closing braces in posted code as quoted material
is particularly disappointing.

But you may find it informative to consider this post. Remove all of the
quoted material and try reading my responses out of context. Does the
result make more or less sense than it would in context? Does the result
actually make any sense at all?

You should also consider the harm you do to others. Every time you post
an inappropriately formatted message you are encouraging some others to
do likewise. The simple truth is that individuals posting to this group
without regard for the conventions that apply to the formatting and
structuring of posts will find their questions being ignored by any of
the regular contributors who care. And you don't have to look very far
to observe that the majority of the potentially most useful regular
contributors to this group do care. You may not have a problem with
shooting yourself in the foot, but you should be circumspect about
encouraging others to do likewise.

Richard.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Sun, 23
Oct 2005 16:03:55, seen in Richard Cornford
It looks like a request to provide some sort of attribution for those
quotes is also warranted.


FYI, your attribution does not meet the minimum considered adequate by
the USEFOR experts. As a minimum, the E-address should be included - we
have a plethora of Jims & Lees, and that would distinguish them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

External JS file question 5
JQuery - Preloading Images 0
External html 2
Help with preloading images 2
Preloading and switching images ... 1
preloading images 2
capture external js filename 0
preloading mp3 0

Members online

Forum statistics

Threads
473,774
Messages
2,569,600
Members
45,180
Latest member
CryptoTax Software
Top