sd9sd Posted June 13, 2008 Share Posted June 13, 2008 I'm trying to decide between using Ajax or PHP for a slideshow....the main priority being that the images which are loaded dynamically should be searchable thru search engines. If the image "hello.jpg" is loaded, the address bar will become www.somesite.com/hello or www.somesite.com/image?=hello And the meta tag for the dynamically generated html will contain the keyword "hello". All this, hoping that if a user searches for "somesite.com hello", google should show them the link: www.somesite.com/image?=hello If I load images dynamically this way, will those individual images be google searchable? If not, is there a way to make them searchable? Quote Link to comment Share on other sites More sharing options...
haku Posted June 13, 2008 Share Posted June 13, 2008 Search engines don't use javascript. Ajax is javascript based, so ajax loaded content will not be indexable. The way around this is to create forward and back buttons that work without javascript (php based), then add the javascript over top so that pushing the buttons when javascript is turned on, the images are loaded using AJAX, and when javascript is off, they advance using php. This way the search engines can index the images. Quote Link to comment Share on other sites More sharing options...
sd9sd Posted June 16, 2008 Author Share Posted June 16, 2008 Thanks a million for replying... Please correct me if I'm wrong, but what I understood is that I'll have to make code which will work in two ways, depending on whether the user has turned on javascript in their browser. So I'll be lucky to have the search engine index the image, only if a user with javascript turned off accesses the page? Will this method allow unique url's to be created for images? Quote Link to comment Share on other sites More sharing options...
haku Posted June 16, 2008 Share Posted June 16, 2008 I understood is that I'll have to make code which will work in two ways, depending on whether the user has turned on javascript in their browser. Exactly! So I'll be lucky to have the search engine index the image, only if a user with javascript turned off accesses the page? I'm sorry, I don't understand what you are asking here. Will this method allow unique url's to be created for images? Each image already has a unique URL - the source of the image. This will happen whether you have javascript on or off. However, this method will allow unique pages for each image. Quote Link to comment Share on other sites More sharing options...
sd9sd Posted June 17, 2008 Author Share Posted June 17, 2008 So I'll be lucky to have the search engine index the image, only if a user with javascript turned off accesses the page? I'm sorry, I don't understand what you are asking here. Search engines index pages when a user accesses it, right? And since search engines don't like javascript and ajax, it'll be able to index the page only if a person switches off javascript in their browser and accesses the page right? Will this method allow unique url's to be created for images? Each image already has a unique URL - the source of the image. This will happen whether you have javascript on or off. However, this method will allow unique pages for each image. Yes, unique searchable pages were what I was looking to create...am disappointed that ajax isn't search engine friendly Quote Link to comment Share on other sites More sharing options...
trq Posted June 17, 2008 Share Posted June 17, 2008 Search engines index pages when a user accesses it, right? No, when there spiders do. And since search engines don't like javascript and ajax, it'll be able to index the page only if a person switches off javascript in their browser and accesses the page right? No, see above. Quote Link to comment Share on other sites More sharing options...
haku Posted June 17, 2008 Share Posted June 17, 2008 Exactly. Search engine spiders are little programs that go out and follow links around the internet and see where they go and what information they find. They don't have anything to do with users, and are infact bots (programs). So a user having javascript on or off will not make a difference to the search engines. Quote Link to comment Share on other sites More sharing options...
sd9sd Posted June 17, 2008 Author Share Posted June 17, 2008 thanks thorpe and haku.... but this would mean that the spider will have to sit and keep sending its own query strings to an ajax file... It's hard to believe that a spider would actually generate dynamic content in order to index it. The spider would need to have its own Javascript engine and a really powerful algorithm to find out what query string or xmlhttp request to send, wouldn't it? In short, are there ajax run websites that actually load dynamic content which gets indexed by search engines? If they use the basic rules of Ajax to load content, it'd be a pleasure to try using Ajax instead of PHP. p.s: Haku, did what you mentioned earlier still hold good? Search engines should be able to index the image even when javascript is off, right? The way around this is to create forward and back buttons that work without javascript (php based), then add the javascript over top so that pushing the buttons when javascript is turned on, the images are loaded using AJAX, and when javascript is off, they advance using php. This way the search engines can index the images. Quote Link to comment Share on other sites More sharing options...
haku Posted June 18, 2008 Share Posted June 18, 2008 What I have already said pretty much answers a lot of the points you bring up in this post. It's hard to believe that a spider would actually generate dynamic content in order to index it. Ajax is javascript based' date=' so ajax loaded content will not be indexable.[/quote'] The spider would need to have its own Javascript engine and a really powerful algorithm to find out what query string or xmlhttp request to send, wouldn't it? Search engines don't use javascript. In short, are there ajax run websites that actually load dynamic content which gets indexed by search engines? Search engines don't use javascript.Ajax is javascript based' date=' so ajax loaded content will not be indexable.[/quote'] If they use the basic rules of Ajax to load content, it'd be a pleasure to try using Ajax instead of PHP. They don't. AJAX is javascript based. Search engines don't use javascript. So they don't use the basic, intermediate, or complex 'rules' of javascript. Haku, did what you mentioned earlier still hold good? Search engines should be able to index the image even when javascript is off, right? I'm not sure what you mean by 'should'. Do you mean that they should be able to even though the developer has used javascript to build their site? Or do you mean that they should be able to because the developer has designed their site to work with or without javascript on? If you design your site to first work without javascript, then add the javascript over top, then your content will become indexable. Quote Link to comment Share on other sites More sharing options...
sd9sd Posted June 18, 2008 Author Share Posted June 18, 2008 Thanks a million for replying, haku. I just got confused somewhere down the line... The 'should' was mentioned with the assumption that search engines force a website to generate dynamic content by sending query strings to the website. Since that isn't true, that solves the issue of javascript being search engine unfriendly. Thanks a lot....I think it's better for me to use PHP for now...the main priority for me is to have a search engine index every image that is loaded with a query string. Quote Link to comment Share on other sites More sharing options...
haku Posted June 18, 2008 Share Posted June 18, 2008 Good luck with that! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.