Can this be done? (html + database)

Can this be done? (html + database)

Author
Discussion

bishbash

2,447 posts

198 months

Thursday 24th April 2014
quotequote all
Why not load the data in using ajax? and then use javascript to modify the page?

Decent bots will use something similar to http://phantomjs.org/ to be able to 'read' the javascript parts of the page if that's what you're worrying about?

Dave_ST220

Original Poster:

10,296 posts

206 months

Thursday 24th April 2014
quotequote all
Arh, this is falling into place. I can't just query the DB for "price" as there are loads of prices. I need to query it for the product ID too so the two match up. If I've got it all correct in my head it will be easier to hard code each darn page with this info anyway frown As I said currently we paste JS to each page which then renders all the info in the browser but not to bots. (& looking at the JS all that does is pull the info from the DB via another file named data). Sadly it doesn't look possible. Thanks for taking the time anyway smile

WinstonWolf

72,857 posts

240 months

Thursday 24th April 2014
quotequote all
You'd be better off learning how to display each page using a while loop to be honest. When you add another record to the database it will display automatically.

That said, if it's a major re-write a fudge is usually perfectly acceptable IMO smile

Dave_ST220

Original Poster:

10,296 posts

206 months

Thursday 24th April 2014
quotequote all
bishbash said:
Decent bots will use something similar to http://phantomjs.org/ to be able to 'read' the javascript parts of the page if that's what you're worrying about?
That is all I'm worrying about! To recap, we paste some JS to the page. The page then displays the prices in a browser. View source you just see the JS. I need the bot to see the price along with the schema.org tags.

ATG

20,632 posts

273 months

Thursday 24th April 2014
quotequote all
I can't comment on whether it makes sense to try to get the HTML produced by the server to contain price metadata, but from a technical perspective it is absolutely trivial. However you need to understand what you're doing. It sounds like you've got confidence and aptitude but don't really know what you're doing. I'd get someone to sit down with you, explain what's going on and start working on a solution together. Sounds like you'll pick it up in no time, but you need guidance. Might cost you a small amount, but it'd be worth it.

Dave_ST220

Original Poster:

10,296 posts

206 months

Thursday 24th April 2014
quotequote all
Thanks, I think I really need to start again. I've just used a few tools to view the pages as various bots. None of the prices or anything are there. If I compare to competitors all the info is there. Obviously bots will love them more than me frown The weird thing is I know 100% Google was showing this info in the SERP's last year, like they WERE reading the JS & using it. maybe they decided this schema.org lark was the way to go?? Anyway, thanks for all of your time people, some decisions to be made!!