homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

So you think your good at HTML/JS...
Then please explain why these images are not being cached

 6:23 pm on Sep 20, 2002 (gmt 0)

Ok, i posted a few days ago about a button relaod problem, and got answers, but i havenow researched the problem in great lenght and even erol, the makers of the e-commerce software seem unable to shed any clues...

so... go to www.ali-t-l.com (once again this is no attept what so ever to gain hits, it isnt a functional website, its only there to show people the problem)

let the homepage load and then take a look at the image buttons on the left hand side. They are javascript rollovers built by the software (although no other sites seem to do it built by it) and are inside a 'menu' frame if that makes any difference.

they dont cache. they recall the images from the server each and every time, indeed as far as i can see none of the image on the site cache, as if you leave the homepage and come back, it retrieves the homepage images again.

this causes extremly slow rollover effects, and even means that going from page to page will make them dissapear until you mouseover them again (and then they appear) - even sometimes they refuse to load at all and show the red cross at me.

Its not my browser, its not an IE6 bug, it does the same on all the browsers i and erol have tried, and i cant for the life of me find a reason. is their javascript just bad...?

will JS preloading code help?

I bet this wont help me, but you guys are my best bet...




 6:38 pm on Sep 20, 2002 (gmt 0)

I would think a preloader would help some but not alot since for some reason its still not cacheing the images. Have you checked in the JS scripts to make sure its not making a no cache command? (maybe making a meta tag?)


 6:48 pm on Sep 20, 2002 (gmt 0)

in the first <a> tag there seem to be two onmouseover and two onmouseout. There are better ways to do the js. It looks like you may have it when you say their js is just bad.


 6:52 pm on Sep 20, 2002 (gmt 0)

im not good at JS at all, what is wrong woth the script (i can understand having two of each command could caused problems...

what do you suggest i replace it with, can i just use HTML to do the rollovers, which i know will work...?

what is the command for not caching in js, so that i can check, and what did you mean about creating a meta tag, as that might just mean something, as the software automatically creates mata tags (which i will then change)

thanks guys, im out of my depth in the js...


 6:59 pm on Sep 20, 2002 (gmt 0)

here is a good thread about preloading images [webmasterworld.com]

Ithink Knowles was referring to a no cache META tag but if you are going to change those then that is not a worry. I was only looking at the code for the menu frame and I didn't see one so I don't think that is it.


 7:04 pm on Sep 20, 2002 (gmt 0)

Another for later maybe

handy, generic javascript coding [webmasterworld.com]


 8:17 pm on Sep 20, 2002 (gmt 0)

i know about that thread - but im still let wondering what on earth is wrong...

please help...

A fustrated harley


 8:38 pm on Sep 20, 2002 (gmt 0)

I just fired up Netscape 4.77. The images work perfectly with it. Images cache, rollovers are instantaneous and so on. And the javascript console reports no errors in the js at all.

IE 6 shows all the visual problems you mention.

I just took on a site with some complex rollover code that misfires even worse than yours in IE6. I switched the whole thing over to CSS and hover effects. I can no longer justify the bandwidth and the browser oddities. It doesn't really help sales, IMO.

I tell you, I think that the browser is the problem here. In fact, the more complex the DOM has become, the worse things are at the most basic levels.


 9:09 pm on Sep 20, 2002 (gmt 0)

Hit your site in Galeon 1.2.6 and Mozilla 1.1, and (unsuprisingly) got the same results in both of them. First time I loaded, it took several seconds for the header and menu to show up, but the mouse-overs happened as fast as preloaded ones. Perhaps they are, or perhaps it's just that I have 1.5Mbps download speed. The first time I re-load, the header and menu don't render at all, and the main content area is replaced by a message about the site being under construction. Hit reload a few times, no change. Enter the URL again rather than hitting reload, get what I described for the first time. Sobsequent reloads also produce the working page.

Konqueror just gets the construction message with no header or menu bar.

I'm a Javascript neophyte myself, so I don't know *why* that's how it works, but it is what happened. One shot in the dark I might offer is that all three browsers in which there seem to be reports of this working put "Mozilla" somehwere in their browser identification string.

Hmm... supporting evidence: I tried in Opera claiming to be IE5 - no problems. Tried in Opera claiming to be Mozilla - no problems. Tried in Opera claiming to be Opera - got a javascript error.

Perhaps there is browser sniffing going on that only delivers working code to a subset of browsers?


 10:20 am on Sep 21, 2002 (gmt 0)

very interesting guys, thanks alot...i dont have the access to such a lot of browsers all by myself here. as i said, it doesnt work under IE6, or IE6 + SP1, but then microsoft have absolutly no record of the problem occuring in the knowledge base - which is normally a very good indication that its not an IE6 problem, as they of all people would know about it...

i too have some funny relaoding problems too, and as soon as i can talk again to Erols tech support, i will try get to the bottom of it - i cant myself see any decent reason for it not reloading, but let me explainhow it works from this end...

the file Erol.html, which has now been turned into index.htm doesnt run offline, it simply loads the under construction thing and stops, which means it must be calling other stuff i dont know about. yet if i say "preview offline in browser" it works fine, and if i upload it and simply run erol.htm then it works fine too (or as fine as it does anyway)- which is wierd, is it calling css or js from somewhere else? if so, why isnt that built in enough to run offline from just the main file?

All was going well, but this loading thing seems stupidly complicated and useless, but quite where to start converting those bits over to css or HTML is daunting - that software produces god awfully unreadable code...

I have also noticed that the code is not declaring itself properly - either in the language its in of the HTML type its in...validators flag it up and say sort it out, but could that be the problem. i could see how that could cause instabilty in some browsers. The code on erol.htm (now index.htm on the web) starts :


ive found lots of other sites that dont decare the HTML type ect, but i wonder of they might be something...

Thanks alot guys - were getting a little closer...



 11:23 am on Sep 21, 2002 (gmt 0)

Harley, this has nothing to do with your original question. But you might want to have a look at your site in a 800X600 screen resolution. The Contact button and your address and telephone number below it don't show. You might want to add a scroll bar to that frame or change the design.


 2:11 pm on Sep 21, 2002 (gmt 0)

Susanne thanks for the point but problem is well known about and sorted out, just not updated. the contact button shows with no scroll, but the address is hidden, call it a perk of having greater than 800,600...

Thanks alot...


p.s any more funny bits like that i love to know


 7:14 am on Sep 22, 2002 (gmt 0)

You are most welcome.
Alright, I found another small detail regarding 800X600. When you go to the Products page you will get a horizontal scroll bar besides the vertical one. You might want to squeeze the content of that page together a little more to prevent that bar from appearing. It gets a little worse when I click on any of the main three product links as the bar gets longer and you can't see the text and the picture at the same time.
Just my 2 cents! Happy coding and good luck with the site.


 12:24 pm on Sep 22, 2002 (gmt 0)

The page needs a DOCTYPE declaration, perhaps:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
on the first page, and
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
on other pages.

<SCRIPT SRC=store.js>
should become
<SCRIPT type="text/javascript" language="JavaScript" SRC="store.js">
but the LANGUAGE part isn't so important.

Numeric figures are best put between quote marks, anything with # or % or px on it, should definately be quoted for example: WIDTH="100%" and so on.

Site works fine in NN 4.72. After an initial delay of two or three seconds while the page is assembled, everything seems fine.


 1:06 pm on Sep 22, 2002 (gmt 0)

Thanks alot G1smd, its very nice for you guys to take the time to actually right out stuff for me

im glad it works fine on 4.72, does absolutly zero happen for 2-3 secs, or do you at least get that silly message saying page loading or under contruction stuff...?

would you say thats too long for users to wait? Its always hard for a fashion house, as they want lots of pretty stuff and images ect, and that means loading time, though i have optimised stuff tons...

could the quote thing be causing the instability in some browsers...?

Thanks again SOOO much...



 3:25 pm on Sep 22, 2002 (gmt 0)

its very nice for you guys to take the time to actually right out stuff for me

Yes, we've definitely spoiled you. We're turning the corner into a specific site review here -- and that isn't what the forum is about, after all ;)

As a general principal a website visitor should see something usable in 2-3 seconds or you will get more one-hit-wonders. And also as a general rule, frames will lower site usability for a certain segment of humanity.

When you know that you will have graphic slickness taking up bandwidth, I'd get very serious about eliminating all the unneeded extras. It will really give you a leg up on your competition.


 5:27 pm on Sep 22, 2002 (gmt 0)

Tedster. Im sorry for making the comment about "any other thoughts let me know" - i never gave the adress for passing comment - it was others passing it...

The address was given so that you, and others could see a problem that was of interest, and difficult to solve - with the hope of course of me finding a solution, and educating other newcomers, as well as the rest of you who cant really help me as to the cause and solution...

anyone else - please take a look and see if you can understand why the problem is occuring - and what other browser it may of may not work in. And in the interst of keeping the elders happy - dont pass any judgement on the site...

Thanks :)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved