Jump to content


Photo

Help with Reload vs javascript


  • Please log in to reply
4 replies to this topic

#1 Riparian

Riparian

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 18 February 2013 - 01:07 AM

Hi.

I am after some advice please.

A number of times I have tried different slideshow javascripts from the web to change the main image on my site.

They all require considerable load times.

I was considering a simple reload of the page after 3 seconds and each time a new image (one of say... 3 images at 65kb each) would show

Does anyone see a downside in this method ?

Cheers

#2 KevinM1

KevinM1

    Snarkimus Prime

  • Moderators
  • 5,229 posts
  • LocationNew Hampshire, USA

Posted 18 February 2013 - 08:28 AM

Hi.

I am after some advice please.

A number of times I have tried different slideshow javascripts from the web to change the main image on my site.

They all require considerable load times.

I was considering a simple reload of the page after 3 seconds and each time a new image (one of say... 3 images at 65kb each) would show

Does anyone see a downside in this method ?

Cheers


Yeah. The downside is refreshing the entire page when all you want is a slide show.

Where did you find your slide show scripts? Most modern scripts are fast. Also, have you optimized your images? Do they need to be 65kb each?

#3 Riparian

Riparian

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 19 February 2013 - 02:48 AM

Thanks for the reply Kevin

Recent ones are responsiveslides and nivo slider and although they are good they still need up to 91 kb and 30kb of js scripts to run them. Not huge but I think the front page speed is escential. I dont know whether the sides themselves add to this but I would guess so, so 3x60kb 180kb +120kb and it is getting up there.

My images are reduced to the max but unfortunatly they are necessary for the site (ausspecs com au)

If you know a better way I would be most greatful.

Cheers

#4 KevinM1

KevinM1

    Snarkimus Prime

  • Moderators
  • 5,229 posts
  • LocationNew Hampshire, USA

Posted 19 February 2013 - 09:37 AM

Unless you're experiencing lag, or you're really concerned about mobile devices, I wouldn't sweat it. Just try to keep the number of hits to the server to a minimum.

I'm not an expert in mobile development (just getting into it myself), but there are techniques that can help. For example, only showing one image if the display area is a certain size, and injecting the slide show code and dynamically loading the other images if it's above that. This book (http://www.abookapar...sive-web-design) goes into it in detail.

#5 Riparian

Riparian

    Advanced Member

  • Members
  • PipPipPip
  • 152 posts

Posted 23 February 2013 - 08:37 PM

For anyone interested I have found a fantastically simple and effective banner rotater. It uses a whole 3Kb and took all of two minutes to get running.

http://simplythebest.net/scripts/DHTML_scripts/javascripts/javascript_131.html

Cheers




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com