www.webdeveloper.com
Results 1 to 4 of 4

Thread: Help please - images in JS slideshow?

  1. #1
    Join Date
    Nov 2011
    Posts
    2

    Help please - images in JS slideshow?

    Hi,

    Sorry if this is a stupid question, I am a beginner. Here is my website:

    www.simonkennedy.net

    I am wondering if all the images I put in the slideshow are visible to Google and other search engines?

    I have spent some time recently adding good file names and alt text tags, but is it worth it - is there anything about the type of slideshow this is that makes the images invisible to search engines?

    I am worried about this because I recently put the site into Websitegrader and it saw only two images (the graphic elements) and none of the photographs.

    Would I be better off with a different type of slideshow that would make the images visible?

    Thanks very much for any help in advance - much appreciated.

    Simon

  2. #2
    Join Date
    Jan 2009
    Location
    Insanity
    Posts
    1,131
    Definition and Usage

    The <img> tag embeds an image in an HTML page.

    Notice that images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag creates a holding space for the referenced image.

    The <img> tag has two required attributes: src and alt.


    Yes you need the alt tag.

    I would also suggest that you turn most of the image stuff in to an array, eg

    Code:
    captions =["BBC Headquarters, various, 2010.",
    "Arc Centre, Bury St Edmunds, Hopkins Architects, 2010." ... ];
    images = ["photos/001_bbc_portland_place_new_broadcasting_house_london_architectural_photographer.jpg",
       "photos/002_bury_st_edmunds_arc_centre_hopkins_london_architectural_photographer.jpg" ... ];
    // turn in to an array of objects 
    for( i in images )
    	images[i] = {src:images[i],caption:captions[i]};
    The example above compiles the array in to an array of objects. You then use a function to get the array element and that array element will equal an object which has properties that can be accessed.

    Code:
    function getImage(){
       current = images.shift();
       images.push( current );
    return current; // return the object
    }
    The beauty of rotating an arrays content is you do not need to track the current image number or to keep any further variables to mark the next item as it will always be the first item in the array.

    The function rotates the array of objects and returns a copy of the current object.

    you then will need only preload the image and use one image place holder or div
    Code:
    obj = getImage();
    displayImage = new Image;
    displayImage.src = obj.src;
    displayImage.alt = obj.caption;
    
    document.getElementById("theDisplayDiv") = displayImage;
    Or something like that... Then you would use a small bit of script to take the text in the alt tag of the current image and populate the caption div, again you would only need one caption div and not a hundred odd.

    As for the other issues about the search engine, having proper and well written meta data is better. If you allow directory listings on your server you will get more traffic but run hotlinking issues.

    Proper meta will get you further in the rankings. If you were to have unrelated key words in your meta data then you would not get as good a positioning as with more precise meta data. This I proved in a site I built where the original site was appearing somewhere in the 1,000's in the page returns until I crafted some meta data and before long the site was in the top 5 returns from simply applying alt tags to images, proper meta data and a couple of other things that help the search engine crawl the site like allowing the bot to follow links.

    Testament to this fact was when the site disappearance led me to call a mutual friend and they told me that someone claiming to be a web developer had redesigned the site and where to find it. It was buried in a site all about poetry and the mans site was an artist and painter and his ranking fell off the face of google and because some poet / writer thought she was a web developer, she killed the mans site.

    Anyway, less of the ramblings, yes alts are important as is other data and especially the way google ranks your pages. It is likely you only found two images because thats what was easily accessed.

    I would also suggest that you "Watermark" your works as its open to theft and reuse and you get none of the credit.
    We all have baggage to carry in life, unfortunately for me I always get the trolley with the wonky wheel...
    Code:
    Youre = {
          STILL_not_getting_it:function(){
               alert("YOU, the original poster / thread starter NEED to POST the code and NOT a LINK.");
          },
          MissingThePoint:function(msg){
                alert("You're missing the point. " + msg);
          }
    }
    Youre.STILL_not_getting_it();

  3. #3
    Join Date
    Nov 2011
    Posts
    2
    Dear Junkmale,

    Thanks very much indeed for your help.

    I think it is beyond my technical knowledge to change the site as you suggest to an array. I can see that your way is more efficient, but seeing as I only know how to do it the way it is set up and as I will have to pay someone to do this, is it worth it?

    I will certainly add the ALT tags and hope that that will help, and check the Meta tags as you suggest.

    Thanks again.

  4. #4
    Join Date
    Jun 2011
    Posts
    34
    spkennedy3000:

    See,

    Multiple Fading Slideshows

    No coding needed!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles