SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot Polo's Avatar
    Join Date
    Mar 2004
    Location
    United States
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Links displayed using .js files

    Hi, i have a question. Will major search engines (specially google) crawl and go thru links (and hopefully index them) that are displayed thru .js files?

    thanks in advance.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Give us an example of the 'js link' you're talking about.

    If you have the following then the SEs will not follow that link.
    Code:
    <a href="javascript:openLink('http://somewhere.com')">Click Me</a>
    The following is the proper way to do this. The SEs will follow this link. In addition, this link will work even with js disabled.
    Code:
    <a href='http://somewhere.com' target='myWindow' onclick='openLink(this.href);return false;'>Click Me</a>

  3. #3
    SitePoint Zealot Polo's Avatar
    Join Date
    Mar 2004
    Location
    United States
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well what i'm basically planning to do is adding something like this on every footer of my pages:

    Code:
    <script language="JavaScript" src="http://www.mydomain.com/javascript.js">
    </script>
    and then having in that js file some basic links like this:

    Code:
    <a href=http://www.mydomain.com/aboutus.html>About Us</a>
    and then whenver i would like to change the links of the footers of all my pages, i would go to this js file and edit the links there...

    and i would like to know if search engines will crawl and follow those links...

    thanks for your help...

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Polo,

    To accomplish that you need to use server-side includes. So that you can simply 'include' html in a file directly into the page - as the page is being put together on the server.

    Does your host provide support for SSI, or PHP, or Perl, etc? Its possible that you already have PHP included in your hosting package.

  5. #5
    SitePoint Zealot Polo's Avatar
    Join Date
    Mar 2004
    Location
    United States
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i know php and ssi, but what i want to accomplish requires displaying links and text in different domains...

    that is why i was looking towards .js files, since it can be used by calling the remote location...

  6. #6
    SitePoint Zealot Polo's Avatar
    Join Date
    Mar 2004
    Location
    United States
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    anyone that knows? that may be able to help me?

  7. #7
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, the SE's spiders will not follow those links created via document.write.


Bookmarks

Posting Permissions

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