Hi everyone!

Here's my problem. I seem to have made a rookie mistake that is preventing 
Google for indexing my site and I'm trying to figure out how to fix that.

I made a Django-powered site that dynamically builds pages by stitching 
together information from my database with a bunch of external API calls. 
Because the API's take unpredictable amounts of time to return, I built the 
site so that Django receives a URL and returns a minimal HTML page with a 
bunch of named empty <div's>. I then use jQuery to make a bunch of calls 
back to my Django server, asking it to hit the API's and process the 
returned data and return the results to the client as JSON. The JSON then 
gets inserted into the div's and the page gets filed with content.

I realize that this is a bit of an stretch of the normal Django paradigm, 
but I found that this process really improves my perceived page load speed 
since minimal page renders immediately and the user can start reading 
fast-loading content while waiting for the slower API's to finish.

The problem is that by default, Google et al. only index the HTML page the 
server initially returns, which is mostly blank. 

So the question is how best to make Google index the full, content rich 
page instead. I've been researching for a couple of hours and it looks like 
Google has instructions for  how they normally deal with AJAX'y pages (
https://developers.google.com/webmasters/ajax-crawling/docs/getting-started). 
But they mostly suggest replacing hashes with hashbangs; I'm not using 
hashes (maybe I'm doing this AJAX wrong...) so I'm not sure that applies to 
me. 

The other option is to put a <meta name="fragment" content="!"> tag in the 
head of the HTML, which will cause the crawler to request www.example.com*
?_escaped_fragment_*, and then somehow redirect that request to a different 
view that generates a complete static version of the pages completely in 
python. I imagine that could be done either by rejiggering the code or by 
using some sort of headless browser (perhaps even the Django testing 
client.)

Anyway, before I spend a long time hacking on a solution I just wanted to 
check if this is a solved problem with an easy way out (or whether I've 
just screwed myself and and need to start digging my way out.)

Thoughts?

Thanks!
-George

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to