The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “1Win

SE's follow java script??

redsy

New Member
affiliate
Been trying to update a sitempa and the generator wasnt picking up some urls!!!

After a bit of reading i came accross some info that said javascript links are not followed by the crawler.

Not sure whether this refers to sitemap creator or google bots.

Due to the site expanding faster than i imagined and not being particularly well done in first place, my menu sytem on every page is a bit of java script to help me change easily. This works well though now a bit concerned it will prevent PR flowing round my site well.

Can google follow links within java script. Site in signature 'HIPS'
 
Unfortunetly googlebot does not follow javascripts links, so if the href tag is missing the crawl is stopped.
 
Unfortunetly googlebot does not follow javascripts links, so if the href tag is missing the crawl is stopped.

Hi Bagi,

argggggggggggg!! i hope you wouldn't of said that though thought you would.:(

This is quite a big ouch!!!?????

Is there a solution that i could use to recreate the same affect that would be google friendly?

ie i would like to add menu or code to each page and be able to alter in one place and it would replicate one every page, like wordpress does etc.

At present as you will see it is .html and 1 css style sheet, plus blog tagged on with wordpress.
 
if you are using JS navigation then it doesn't exist. they can use JS for url discovery, but they are unlikely to be indexed as there will be no links to them. Get all the links into your noscript tags.
 
Is there a solution that i could use to recreate the same affect that would be google friendly?

ie i would like to add menu or code to each page and be able to alter in one place and it would replicate one every page, like wordpress does etc.

At present as you will see it is .html and 1 css style sheet, plus blog tagged on with wordpress.

My advice is
1. make the menu php includes.
2. use HTaccess to parse the html file extension as php. I have done it on my website umbrella-consultancy.co.uk take a look, they are html pages, in the browser, but in fact they are php and use php includes :)

Nioce solution, you ge dynamic navigation sitewide, the search engines get to keep the same urls. happy days :D
 
if you are using JS navigation then it doesn't exist. they can use JS for url discovery, but they are unlikely to be indexed as there will be no links to them. Get all the links into your noscript tags.

Hi OWG,

luckily by sounds of it my pages are mainly indexed and even done sitelinks - how i dont know see here

Am a bit slow sorry!! what do you mean by noscript tags?
 
My advice is
1. make the menu php includes.
2. use HTaccess to parse the html file extension as php. I have done it on my website umbrella-consultancy.co.uk take a look, they are html pages, in the browser, but in fact they are php and use php includes :)

Nioce solution, you ge dynamic navigation sitewide, the search engines get to keep the same urls. happy days :D

Sounds great, umbrella-consultancy.co.uk just appears as normal .htm

Will i lose ranking with changing the pages to php and parsing to .html?

would i actually be changing pages to php or just using php for menu system?

and last question know anyone who could do this at a reasonable fee - probably beyond me to write!! though could add to each page - you know the donkey work:lol:
 
This is an example of my left menu system and i refer to it on page as

HTML:
<script type="text/javascript">
//<![CDATA[
leftMenu();
//]]>
</script>
HTML:
function leftMenu() {
  var menu;
  menu='<a href="">Home</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';
  menu=menu+'<strong>Services</strong><br />';
  menu=menu+'<a href="HIP_EPC_services.html">- Home Sellers</a><br />';
  menu=menu+'<a href="HIP_industry-professionals.html">- Industry Professionals</a><br />';
  menu=menu+'<a href="landlords.html">- Landlords EPC</a><br />';
  menu=menu+'<a href="commercial_epc.html">- Commercial EPC</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';
  menu=menu+'<strong>Information</strong></a><br />';
  menu=menu+'<a href="home_information_pack_information.html">- HIP</a><br />';
  menu=menu+'<a href="EPC_energy_performance_certificate.html">- EPC</a><br />';
  menu=menu+'<a href="Non_Domestic_EPC.html">- Commercial EPC</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';  
  menu=menu+'<a href="view-hip-online.html">View HIP Online</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';  
  menu=menu+'<a href="about_HIP-Consultant.html">About HIP-Consultant</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';  
  menu=menu+'<a href="testimonials.html">Testimonials</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';  
  menu=menu+'<a href="home_information_pack_news.html">HIP News</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />'; 
  menu=menu+'<a href="HIP_FAQ_menu.html">HIP & EPC - FAQ</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';  
  menu=menu+'<a href="useful_HIP_EPC_inks.html">Useful HIP & EPC Links</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';  
  menu=menu+'<a href="contact.html">Contact HIP-Consultant.co.uk</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';  
  menu=menu+'<a href="sitemap.html">Sitemap</a><br />';
  menu=menu+'<img src="../assets/gfx-nav-divider.gif" alt="spacer" width="120" height="1" /><br />';  
  menu=menu+'<a href="blog/">HIP Blog</a>';
 
 
  
  
  document.writeln(menu);
}

This was a bad idea:(
 
OWG, Bagi or any others

what is this code i need to add to .htaccess?

and where would i place it?

already have following in .htaccess

HTML:
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.html? [NC]
RewriteRule ^(([^/]*/)*)index\.html?$ http://www.hip-consultant.co.uk/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^hip-consultant\.co\.uk [NC]
RewriteRule ^(.*)$ http://www.hip-consultant.co.uk/$1 [R=301,L]

Redirect 301 /services.html http://www.hip-consultant.co.uk/HIP_EPC_services.html
 
Lots of questions, it is late, so i will reply tomorrow :)

would be appreciated. I have written php includes with some help and created a test page here this is displaying as i wish, just need to redirect all php files to .html

and added following to bottom of .htaccess listed above.

addtype application/x-httpd-php .html

this doesnt seem to be redirecting page though.
 
Last edited by a moderator:
ok i think ive cracked it, though please could you confirm


  1. added php includes instead of java script - ye haaaaaa now has all links within source code!!
  2. created php file for each right, left menu and footer.
  3. added AddType application/x-httpd-php .html .htm to bottom of .htaccess file in root.
  4. now the bit i was getting wrong i think!! had renamed test page, test.php though when returned it to test.html it works. I take it the code within .htaccess is processing php includes within a html file??
So now do i ......

  1. move all php files (ie rightmenu.php, leftmenu.php, footer.php)to mydomain.co.uk/ (was testing and had in seperate folder domain.co.uk/php/)
  2. do i need to add php files to each directory or will one copy in root be ok??
  3. leave .htaccess as it is or do i need a new .htaccess file in each directory with just line in no.3 above?
  4. and now go through every page changing JS to php includes
cheers guys dont know where id be sometimes without your input, you rock !!!:kneeled:

my knowledge is limited but this is a FANTASTIC work around, if ive got it right!!!

test page here
 
Last edited by a moderator:
cant your JS menu just be done in css?... bit shocked no one has mentioned that... if you need an example of what i mean i can show you our beta site but will have to be over PM as its not public...
 
Couldn't you have just used the NOSCRIPT tags to include your plain href so Google will see all of your links then and your JS menu would be OK too (although as SEOPaul mentioned, try converting to a CSS menu)
 
Couldn't you have just used the NOSCRIPT tags to include your plain href so Google will see all of your links then and your JS menu would be OK too (although as SEOPaul mentioned, try converting to a CSS menu)

possibly though not sure!! however, this is now done and really happy - seems to be working great.:thumbsup:
 
MI
Back