Javascript's write(), and google's interpretation of it...

  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

I'm thinking about writing a script as an alternative to the RSS feeds on my site.

Many of the people who would want to include my site's recent news & forum postings on their own site's, don't have the ability to implement an RSS reader on their site (either their account isn't capable of running the PHP/CGI scripts required to parse the data & display it, or they're simply incapable of creating a script to read the feeds & implementing them on their site).

What I was thinking, was have them do something like a...

Code: [ Select ]
<script language="JavaScript" src="http://www.mysite.com/whatever.php"></script>


on their page in order to incorporate my content. Then that PHP script would just pull the data out of the database, and output JavaScript code, using document.write(); to send out the final text.

Would Google see the http://www.mysite.com/whatever.php and see it as a backlink, and hence count towards my PR?

Would google read the content of the document.write(); statements and see the URLs in it and look at them? Of course, those links would be from a page on my own site linking to other pages on my site as far as Google was concerned, right?

I'd like to hear SEO Guy's opinion on this. Any other suggestions of how I can do this with minimal fuss to the webmasters that want to include my content, whilst also helping me out with Google?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • SEO Guy
  • Beginner
  • Beginner
  • User avatar
  • Posts: 47
  • Loc: Canada

Post 3+ Months Ago

:( No backlink No PR

Because the output is called on page via the Java document.write(); I dont think think the links will be spidered. Google tends not to parse links pulled from an array or database VIA JAvascript

http://www.photoiq.com/ for example has a set of links pulled via Java in the center of its page that appear hardcoded to the user but are in reality pulled via a similar technique and are not spiderable

A good way to check this is run it though a spider simulator such as http://www.webmaster-toolkit.com/search ... ator.shtml and see if the links are picked up. However my initial response is that they wont be.

Another simple way to test is to pull the source of the site and paste into DW or another editor, because the local file wont be able to be sourced if the links arent pulled by the script they arent seen.

Cheers
  • SEO Guy
  • Beginner
  • Beginner
  • User avatar
  • Posts: 47
  • Loc: Canada

Post 3+ Months Ago

What about providing a simple php include code that sources a file that dynamically updates with your new fresh content?

Some thing like:

<?php
include("http://www.domain.com/_inc/freshconent.inc");
?>

Or is the problem that their hosts dont support php?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Yeah, it's a host-restriction... Many of the reptile sites out there are just run by individuals at home who just wanna put a few pics up to show off or whatever, and are hosted on free servers like Angelfire, Tripod & *plum*, so they're pretty limited on what they can do.

Otherwise, yeah, it'd be no problem. If they could run PHP, I've got a reader here, all they'd have to do is..

Code: [ Select ]
<?php
 include('rss.php');
 echo news_feed('http://whatever.com/backend.php');
?>
  1. <?php
  2.  include('rss.php');
  3.  echo news_feed('http://whatever.com/backend.php');
  4. ?>


because news_feed(); just return()'s its output.

But yeah, my problem is HTML only, any code would have to be client-side - which I guess there isn't anything I can do to help with Google at all...

But what about the actual URL that's the src bit of the <script> tag? Wouldn't Google see that URL even if it doesn't see the URLs in the document.write?
  • SEO Guy
  • Beginner
  • Beginner
  • User avatar
  • Posts: 47
  • Loc: Canada

Post 3+ Months Ago

<script language="JavaScript" src="http://www.mysite.com/whatever.php"></script>

This one? Done think it'll get read within a script tag sorry
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Okies, thanks, I wasn't sure whether it would or not. Ahh well, only other option would be an iframe I guess.
  • clasione
  • Newbie
  • Newbie
  • clasione
  • Posts: 14

Post 3+ Months Ago

Is there any updates on this?


Any signs that G can reed the java rss yet?
  • darksat
  • Proficient
  • Proficient
  • User avatar
  • Posts: 487
  • Loc: London (via the rest of the world)

Post 3+ Months Ago

Actually google is now starting to spidering js files and follow some backlinks

what I would recomend is
Code: [ Select ]
<script language="JavaScript" src="http://www.mysite.com/whatever.php"></script>
<noscript><a href="http://www.mysite.com/noscript.php">Click here for news</a></noscript>
  1. <script language="JavaScript" src="http://www.mysite.com/whatever.php"></script>
  2. <noscript><a href="http://www.mysite.com/noscript.php">Click here for news</a></noscript>

Post Information

  • Total Posts in this topic: 8 posts
  • Users browsing this forum: No registered users and 3 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.