/    Sign up×
Community /Pin to ProfileBookmark

Content loaded with XMLHttpRequest() (or Jquery load function) not parsed by Google

Hi, on my site I am using XMLHttpRequest (or JQuery load() function) to add an external html file to multiple pages. It works fine, but the external content is not parsed by google. For example, the content of the “Pin Headers” section on the following page is obtained from an external page via the load() function:
[url]http://modtronix.com/in485p-tbp.html[/url]

If you google “in485P-TBP”, and have a look at the cached result, you see the “Pin Headers” section is empty.

The load() function only adds the content of the external page to the “Pin Headers” section after about 1 second or so. So, seems like Google does not wait that long before it parses the page. Is there a way to get Google to include the content of the external page I am loading?

The code on my page is:

[CODE]
<script type=”text/javascript”>// <![CDATA[
var req = new XMLHttpRequest();
req.open(“GET”, “myfiles/gc.php?seo=csup-imod-gen&id=imod-hdrs”, false);
req.send(null);
document.write(req.responseText);
// ]]></script>
[/CODE]

And code using JQuery:

[CODE]
<div id=”imod-hdrs”>&nbsp;</div>
<script type=”text/javascript”>// <![CDATA[
$(“#imod-hdrs”).load(‘myfiles/gc.php?seo=csup-imod-gen&id=imod-hdrs’);
// ]]></script>
[/CODE]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @modtronix_com spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...