Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Absolute URLs in External JavaScript

Will google find them?

         

cjthibeault

5:01 am on Feb 2, 2005 (gmt 0)

10+ Year Member



Hello Everyone,

My site currently uses SSI to serve up my navigation, but my hosting provider every now and then makes a change to the server which screws it up, and results in updates to my includes taking a while to become live. So, I've decided to go the JavaScript route.

My JavaScript is nothing complicated, my function writes out some table layout stuff, and I have hardcoded absolute URLs to my pages contained in document.write("<a href=\"http://www.site.com/abc.htm\">");. The JavaScript is contained in a single external .js file.

Will Google be able to find and follow these links? Since there is nothing fancy going on, I figure it won't be much of a problem, but I want to check first with people who know better than I.

If this won't work well for Google, is there a way I can setup my SSI to provide SSI'd nav links to google, and write out my JavaScript to regular users?

I really appreciate you taking the time to enlighten me on this.

Thank you,
Chris

newsphinx

7:30 am on Feb 2, 2005 (gmt 0)

10+ Year Member



Why not just changing to another better hosting company?

cjthibeault

7:52 am on Feb 2, 2005 (gmt 0)

10+ Year Member



This is the only problem I have with this hosting company. In general, their support has been fantastic (less than 15m response time), and I get plenty of space/bandwidth for only $20. I am redesigning the whole site anyway, so the effort in recoding things isn't an issue. Further, I don't want to go through the hassle of moving to another host, getting things setup again, and all that.

It seems like it would be simple for google to just follow a external js link, and look for anything that looks like a fully formed URL, and then just follow it. So I'm hoping someone can confirm this can happen.

Worst case scenario, I could change hosts. My main problem that I have right now with SSI, is that if I update my headers or navigation, it 95% of the time works fine. I have a testimonial display on the right hand side that is randomly displayed using SSI (basically picking a quote based on parsing the time), and this has stopped working on my home page, and one other page, but works on all others. Part of the problem is I have setup Apache to treat my html files as server parsed, instead of the usual shtml, etc, and it seems like the host just doesn't get it.

So, anyone seen Google having an apetite for JavaScript these days?

nuevojefe

9:53 am on Feb 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



dissalow it in from being crawled in your robots.txt file.

Skimmed quickly, sorry if I missed something.

cjthibeault

10:06 am on Feb 2, 2005 (gmt 0)

10+ Year Member



I've got the opposite problem. I need Google to go in there... :)

rainborick

2:49 pm on Feb 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I believe I've seen reports here that occasionally one of the experimental Googlebots has been spotted scanning .js files, but I can't seem to find any evidence of them in the index. So if you want Google to see the links, you'll need to embed the URLs inside some JavaScript in each individual document.

robster124

8:44 pm on Feb 3, 2005 (gmt 0)

10+ Year Member



Google seems to be indexing URLs that it can find in any file format at the moment. Whether your linking URL is buried in Javascript, in a flash file or even image formats (I've heard this mentioned in another thread.)

Not sure if PR is distributed in the same way as a normal A HREF link though.