PDA

View Full Version : I've modded the flexi slide show if you want it



surfvenus
03-09-2005, 03:08 AM
I like the flexi slide show, but someone left it up on their browser for two days and it pulled down more than a gig of images, more precisely, more than a gig of the same 3 images over and over and over again.

To stop this from happening, I have added a variable and conditional statement to end the endless loop.

I wasn't sure where to post it because it is not a new script.
I tested it with FF and IE, but it should work wherever the old script did

please advise.

dean
Venus Surf Adventures
surfvenus.com

ddadmin
03-09-2005, 09:37 PM
Hmmm are you sure that's what happened? Unless you're using the script to display some huge image multimedia files, it's very unlikely the script could have used 1 gig of bandwidth just by a visitor leaving the script running for days. Furthermore, most browsers would have cached the rotating content after the first round.

surfvenus
03-11-2005, 01:25 AM
I am fairly certain that this is what happened. below is a snippit of my raw access logs..

24.251.175.189 - - [22/Feb/2005:11:36:26 -0500] "GET /images/firstpic.jpg HTTP/1.1" 200 65370 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [22/Feb/2005:11:36:30 -0500] "GET /images/stretch.jpg HTTP/1.1" 200 75010 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [22/Feb/2005:11:36:35 -0500] "GET /images/explorefalls.jpg HTTP/1.1" 200 90683 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [22/Feb/2005:11:36:39 -0500] "GET /images/firstpic.jpg HTTP/1.1" 200 65370 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [22/Feb/2005:11:36:44 -0500] "GET /images/stretch.jpg HTTP/1.1" 200 75010 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [22/Feb/2005:11:36:51 -0500] "GET /images/explorefalls.jpg HTTP/1.1" 200 90683 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
.<snip>
.scrolling...scrolling..scrolling
.<snip>
24.251.175.189 - - [23/Feb/2005:08:11:07 -0500] "GET /images/firstpic.jpg HTTP/1.1" 200 65370 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [23/Feb/2005:08:11:12 -0500] "GET /images/stretch.jpg HTTP/1.1" 200 75010 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [23/Feb/2005:08:11:17 -0500] "GET /images/explorefalls.jpg HTTP/1.1" 200 90683 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [23/Feb/2005:08:11:21 -0500] "GET /images/firstpic.jpg HTTP/1.1" 200 65370 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
24.251.175.189 - - [23/Feb/2005:08:11:25 -0500] "GET /images/stretch.jpg HTTP/1.1" 200 75010 "http://www.surfvenus.com/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"

Note the dates and times... the same pics over and over again. This one IP (now unavailable, but it was a cox dhcp cable user) pulled down 1.22gb (of a total of 1.55GB for all users) of data over the feb22-23 time period by pulling these small files over and over again (I think).

My awstats tells me that 1.5G of the bandwidth for the month was of jpgs.

The images are roughly 60-90kB.

I just did the math, and it seems that even with .1MB file size the most they could get for a day with the pictures rotating every 4.5 seconds is 192MB. AAAUUUGGGHH. I thought I had figured it out.

I'm not sure what else to think.

I wish that the browser cached the images, because then I wouldn't have to worry about it. Perhaps what I really need is help figuring out why browsers are not caching the images..?

dean

surfvenus
03-11-2005, 01:40 AM
I am fairly certain that this is what happened.

The images are roughly 60-90kB.

I just did the math, and it seems that even with .1MB file size the most they could get for a day with the pictures rotating every 4.5 seconds is 192MB. AAAUUUGGGHH. I thought I had figured it out.

dean

OK I just re-did my math :)
average size of 3 images is 75KB

.075MB /4.5sec * 60 sec/min * 60 min/hr *22hr (11am-9am)= 1320 MB

Maybe that is what happened.

at any rate, I figure i still need to get the images to cache... or at least not count as hits on my site.

TIA,
dean