two issues more to go 1)background img 2.) animated .gif ...

S

shajnday

1.)i had put an img as a background image and have aligned and
positioned text and images all over it,
the server on which the site is hosting is very slow so images load
very slow. I have about 10images which i have reduced in size 10x on
the front page. This linked images than are leading on to big real
images-pictures.

The question is, how to make background image to load-preload as the
first no1. img? and then the rest of images will load naturally
depending on the server limited speed.

2.) i also have animated .gif on another site which web-adress some of
guys got on their e-mail, the problem is that this animated gif is
working but after some time being on the page it stops animating.
What html working could i apply or java or something else for this
animated gif to animates constantly ?

Thanks.
That would be it, This is it!
Thanks Michael!
 
D

dorayme

<[email protected]
m>,
shajnday said:
1.)i had put an img as a background image and have aligned and
positioned text and images all over it,
the server on which the site is hosting is very slow so images load
very slow. I have about 10images which i have reduced in size 10x on
the front page. This linked images than are leading on to big real
images-pictures.

The question is, how to make background image to load-preload as the
first no1. img? and then the rest of images will load naturally
depending on the server limited speed.

Can't help with this much except to say a background image should
be very modest in size. And should in general be an extra to the
content (which matter then is subject to the argument that
content is king and therefore content should have priority). How
big is it in file size?
2.) i also have animated .gif on another site which web-adress some of
guys got on their e-mail, the problem is that this animated gif is
working but after some time being on the page it stops animating.
What html working could i apply or java or something else for this
animated gif to animates constantly ?

There is nothing you can do about animation looping if the user
has set his or her browser to stop after x number of loops (I
have a browser to stop them after 3 loops, they drive people
crazy. Consider it a plus rather than a negative that it
happens). The other thing I might mention is this. When you
prepare and save an animated gif, you can control the number of
loops and then that sets an upper limit, no browser can overcome
this.
 
A

Andy

shajnday said:
1.)i had put an img as a background image and have aligned and
positioned text and images all over it,
the server on which the site is hosting is very slow so images load
very slow. I have about 10images which i have reduced in size 10x on
the front page. This linked images than are leading on to big real
images-pictures.

The question is, how to make background image to load-preload as the
first no1. img? and then the rest of images will load naturally
depending on the server limited speed.

2.) i also have animated .gif on another site which web-adress some of
guys got on their e-mail, the problem is that this animated gif is
working but after some time being on the page it stops animating.
What html working could i apply or java or something else for this
animated gif to animates constantly ?

Thanks.
That would be it, This is it!
Thanks Michael!


Hi,

Here are my suggestions...

1: You could use the following script early in the source code to load your
background images first...

<script type="text/javascript">
<!-- PRELOAD CELL IMAGES
Image1= new Image(100,100);
Image1.src = "../images/website/cellbg.png";
Image2 = new Image(20,20);
Image2.src = "../images/website/celltl.png";
Image3 = new Image(20,20);
Image3.src = "../images/website/celltr.png";
Image4 = new Image(20,20);
Image4.src = "../images/website/cellbl.png";
Image5 = new Image(20,20);
Image5.src = "../images/website/cellbr.png";
// - End of JavaScript - -->
</script>

.... the above example comes from my site and does work. The (100,100) or
(20,20) refers to the image dimensions.

Also, as a bonus tip you could take a look at your background image and
figure out the predominant colour and have the background instantly filled
with this colour until the real background image has loaded...

body.content { background: #426384 url(images/website/background.gif)
fixed; }

.... the above example would go in your stylesheet or on page style
declaration and would make the background blue until background.gif had
loaded.


2: This is purely a hunch but I've done some animated gifs myself and the
editor I use, Jasc Animation Shop, and the previous one I used, GifAnim,
both had the option of specifying how many times to loop the anim. Both
programs had 0 to 99 times or infinite loops. My hunch is that when your
gif-anim was saved the author specified 99 times thinking that the user
would prob move onto a different page before the 99 loops where up.

The solution would be to load said gif-anim into one of these programs and
resave with the infinite loop box checked.


Hope this helps

Andy
 
S

shajnday

<[email protected]
m>,




Can't help with this much except to say a background image should
be very modest in size. And should in general be an extra to the
content (which matter then is subject to the argument that
content is king and therefore content should have priority). How
big is it in file size?


52.8KB .jpg

i forgot to mention that it isn't so big.
Yeah, i do understand that more advanced methods of designing web
sites is content pages with or without background, and not old-fashion
eb sites wich are on slow hosting providers. It's just an
presentation site which i'm using for real life purpose. Not making
money over web sites, for now, or i do...
nevermind, content is the king but then i do like old-fashion sites in
a way. This somehow collaborated together(getting slow providing host)
as i do not like spending too much of time on the internet, nor i
would like my kids do that.


There is nothing you can do about animation looping if the user
has set his or her browser to stop after x number of loops (I
have a browser to stop them after 3 loops, they drive people
crazy. Consider it a plus rather than a negative that it
happens). The other thing I might mention is this. When you
prepare and save an animated gif, you can control the number of
loops and then that sets an upper limit, no browser can overcome
this.

Didn't get this last paragraph, i do know for functions consisting
loops;
<marquee loop="infinite"
behavior="scroll"
etc.

did you had that in mind or something like ?
 
S

shajnday

Hi,

Here are my suggestions...

1: You could use the following script early in the source code to load your
background images first...

<script type="text/javascript">
<!-- PRELOAD CELL IMAGES
Image1= new Image(100,100);
Image1.src = "../images/website/cellbg.png";
Image2 = new Image(20,20);
Image2.src = "../images/website/celltl.png";
Image3 = new Image(20,20);
Image3.src = "../images/website/celltr.png";
Image4 = new Image(20,20);
Image4.src = "../images/website/cellbl.png";
Image5 = new Image(20,20);
Image5.src = "../images/website/cellbr.png";
// - End of JavaScript - -->
</script>

... the above example comes from my site and does work. The (100,100) or
(20,20) refers to the image dimensions.

Also, as a bonus tip you could take a look at your background image and
figure out the predominant colour and have the background instantly filled
with this colour until the real background image has loaded...

body.content { background: #426384 url(images/website/background.gif)
fixed; }


Thanks Andy,
i already have put the image color to same color (me brighty!)
Thanks for the tip though.
I'll try the script today and let'you know about improvings.

What would or would not the function " fixed; " do to the background
considering the situation that it is already fixed saying naturally
fixed...?

... the above example would go in your stylesheet or on page style
declaration and would make the background blue until background.gif had
loaded.

2: This is purely a hunch but I've done some animated gifs myself and the
editor I use, Jasc Animation Shop, and the previous one I used, GifAnim,
both had the option of specifying how many times to loop the anim. Both
programs had 0 to 99 times or infinite loops. My hunch is that when your
gif-anim was saved the author specified 99 times thinking that the user
would prob move onto a different page before the 99 loops where up.

The solution would be to load said gif-anim into one of these programs and
resave with the infinite loop box checked.

Hope this helps

Andy- Sakrij citirani tekst -

- Prikaži citirani tekst -


thanks alot.
 
A

Andy

shajnday said:
Thanks Andy,
i already have put the image color to same color (me brighty!)
Thanks for the tip though.
I'll try the script today and let'you know about improvings.



If the net-nannies moan that the above suggestion will only work for the
99.9% of users with javascript enabled, you could try this alternative...

In your stylesheet (or on page style declaration) add the following...

..preloadimage {display: none; }

.... Then in the <body> (asap) add something like this...

<img src="images/background.jpg" class="preloadimage">





What would or would not the function " fixed; " do to the background
considering the situation that it is already fixed saying naturally
fixed...?


On my particular site, the fixed parameter sticks the background image in
place so that content scrolls over it rather than the content AND background
scrolling.


thanks alot.

You're welcome
 
D

dorayme

<[email protected]
m>,
shajnday said:
52.8KB .jpg
....

Not huge I guess (bigger than I have ever used, I think). You
mentioned many other images too (not background). Perhaps your
content is too slow loading rather than the background image
appearing too late. In other words maybe you might get the rest
to load faster by reducing the file sizes of the things that are
delaying the background from loading.

If the server is slow somehow or someone with a slow internet
connection is confronted with your page, be sure that it would be
*less frustrating* for the bg image to be delayed rather than the
content. If you employ tricks to get the background img loading
first that will delay (of course!) the rest.

Perhaps you might give a url where the html can be seen by us?
....

Didn't get this last paragraph, i do know for functions consisting
loops;
<marquee loop="infinite"
behavior="scroll"
etc.

did you had that in mind or something like ?

No. There are two reasons why an animated gif will stop looping
in a browser:

1. The gif was made to stop after a set number of loops. The
maker can control this. Think of it as the gif maker putting a
little invisible intangible ex traffic cop in with the gif who is
ordered to stop it after a set number of loops.

2. The user has a browser that has a preference or option to stop
it after a user set number of loops. The reason browser makers
put in this option is because they were required to by law. There
were too many people going crazy suffering endless looping
animations, some of them tripped into homicidal rages, taking
machine guns into shopping centres etc...
 
S

shajnday

<[email protected]
m>,








...

Not huge I guess (bigger than I have ever used, I think). You
mentioned many other images too (not background). Perhaps your
content is too slow loading rather than the background image
appearing too late. In other words maybe you might get the rest
to load faster by reducing the file sizes of the things that are
delaying the background from loading.

If the server is slow somehow or someone with a slow internet
connection is confronted with your page, be sure that it would be
*less frustrating* for the bg image to be delayed rather than the
content. If you employ tricks to get the background img loading
first that will delay (of course!) the rest.

Perhaps you might give a url where the html can be seen by us?  

MAybe you are right, i'll have to make a testing which is less
frustrating, for now it looks like it hangs abit, but it's not too
long.
The background image i find appropriate and it is somehow deserving to
preload sooner as it gives a cheerly vision on the further content.
It is like a frame for the rest of the content.
pay me and i'll give you a look ! :)
1$

WOW http://www.idocs.com/tags/images/_IMG_LOOP.html

LOOP=infinite really is a buzz buzz buzz,

ha, a loop otpion isn't so important relating to content, i.e. when
discussing some presentation page,
and moreover, the image automatically regenerate when a user goes on
to another page, and so on...adding loop could maybe be interesting if
someone is sitting by the content a longer time, so then i could put a
loop=infinite or loop=33 on example.

perhaps it's a plus.
These browsers with every day a new versions i personally think it's a
waste, i stayed on IE 6.0 for simplicity and nice "user friendly"
outfit, these bubble-trouble browsers which are in the foot with the
industry changes are for myself not a good solutions.

i think i'll resave the animated gif in one of the programs Andy
suggested to give it a try....


No. There are two reasons why an animated gif will stop looping
in a browser:

1. The gif was made to stop after a set number of loops. The
maker can control this. Think of it as the gif maker putting a
little invisible intangible ex traffic cop in with the gif who is
ordered to stop it after a set number of loops.

2. The user has a browser that has a preference or option to stop
it after a user set number of loops. The reason browser makers
put in this option is because they were required to by law. There
were too many people going crazy suffering endless looping
animations, some of them tripped into homicidal rages, taking
machine guns into shopping centres etc...

--
dorayme- Sakrij citirani tekst -

- Prikaži citirani tekst -- Sakrij citirani tekst -

- Prikaži citirani tekst -



I'll write you soon with the changes i have made, on tommorow evening.
Today we celebrate the "Oluja"(one of the most important actions for
freeing Croatia homeland from armed spooky Äetnjiks, "serbs" in
deslusions) it's a non-working day, for workers,not for me =)

Thanks, much appreciated!
 
S

shajnday

If the net-nannies moan that the above suggestion will only work for the
99.9% of users with javascript enabled, you could try this alternative...

In your stylesheet (or on page style declaration) add the following...

.preloadimage {display: none; }

... Then in the <body> (asap) add something like this...



On my particular site, the fixed parameter sticks the background image in
place so that content scrolls over it rather than the content AND background
scrolling.









You're welcome- Sakrij citirani tekst -

- Prikaži citirani tekst -- Sakrij citirani tekst -

- Prikaži citirani tekst -

this another option seems braver, and i would like to test it but i
have a dns problem occured at hosting provider(serer names havne't
been directed but yesterday they were...nevermind),
i have done the html checkup and sucessfully got validated on all
pages.

The .css options for .preload {display: none } seems quite a better
option, i'll try it tommorow after calling my DNS service and telling
about servers problem, i'll post the testings tommorow in evening.

Thanks Andy!
 
D

dorayme

"Richard Cornford said:
dorayme wrote:


There is at least one other reason why animated gifs will stop
animating, and that is in older IE browsers (IE 6 certainly) where any
execution of a javascript pseudo-protocol HREF will put the browser into
an 'about to navigate' state in which it stops bothering to animate
gifs, load new resources (for things such as image swapping), etc. See:-

<URL: http://jibbering.com/faq/#javascriptURI >

I never think of animated gifs as having anything essentially to
do with javascript. But maybe I should begin to. I know moving
pics are javascript possible.
 
D

dorayme

P

Peter

<[email protected]
m>,


Last time I made an animated gif, I used

<div><img src="some.gif" alt=""></div>

but made the animation to loop once as part of it rather than
relying on browsers to use attributes that may not be valid or
even work. I recommend this to you.

Here is an example of an animation that is under user control:

<http://netweaver.com.au/floatHouse/anim/page4anim.php>
Not sure I understand what you mean by 'under user control'. Is that
control by the person who created the gif, or control by the person who
is viewing the gif in their browser?

The only control I have, as far as I can tell, is being able to stop the
animation before it finishes.
 
D

dorayme

Peter said:
Not sure I understand what you mean by 'under user control'. Is that
control by the person who created the gif, or control by the person who
is viewing the gif in their browser?
Generally when I use "user" at least, it means the website
visitor. Other bods are the author of the webpage and the maker
of the gif (the latter two may be one and the same person).

[A bod is some or any*body*, generally a bit human (but ETs might
qualify. It depends. I qualify and so does Luigi (R.I.P.)]
The only control I have, as far as I can tell, is being able to stop the
animation before it finishes.

There are all sorts of things under your control as a user that
are distinct from anything I as a page maker and gif maker have
under my control.

In building the gif, I can make it so it runs a set number of
times *if the user allows it*. There are parameters for this in
gif building algorithms.

As a page maker I can do this *maybe* via loop attributes in the
img elements (but that is not anything I can be bothered to
research, I suspect it very last century and against the
separation of style from content).

Your control is different. You own the browser and can set
options/preferences. You can make animations not play at all, you
can let them play once and not more, you can let them play any
number of times you want (up to the limit built into them by the
creator). At least in some good browsers you can.

You can also stop them. You can see them as you please as many
times as you like by refreshing your browser if the author or gif
maker has set only once. As in the above example.
 
S

shajnday

Not sure I understand what you mean by 'under user control'. Is that
control by the person who created the gif, or control by the person who
is viewing the gif in their browser?

Generally when I use "user" at least, it means the website
visitor. Other bods are the author of the webpage and the maker
of the gif (the latter two may be one and the same person).

[A bod is some or any*body*, generally a bit human (but ETs might
qualify. It depends. I qualify and so does Luigi (R.I.P.)]
The only control I have, as far as I can tell, is being able to stop the
animation before it finishes.

There are all sorts of things under your control as a user that
are distinct from anything I as a page maker and gif maker have
under my control.

In building the gif, I can make it so it runs a set number of
times *if the user allows it*. There are parameters for this in
gif building algorithms.

As a page maker I can do this *maybe* via loop attributes in the
img elements (but that is not anything I can be bothered to
research, I suspect it very last century and against the
separation of style from content).

Your control is different. You own the browser and can set
options/preferences. You can make animations not play at all, you
can let them play once and not more, you can let them play any
number of times you want (up to the limit built into them by the
creator). At least in some good browsers you can.

You can also stop them. You can see them as you please as many
times as you like by refreshing your browser if the author or gif
maker has set only once. As in the above example.

HI all!
A have solved most the problems.
The display: none; for background is not working, it preloads the
background but then other content isn't seeable. The other option with
javascript for now haven't tried...with css display: none; it looks
like the background is in the front(maybe to say z-indexed for front).

But nevermind, the server was craked down as some harddisks were
failing so they swapped them and now the difference in speed is
noticeable.


On the other webpage as i have validated conent, seems i no longer
have a problem with showing imgs in IE6.0.


thanks.
c.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top