Forum Moderators: open
In the past, I've just done a quick manual check of some common User Agents (Google and a few others) using the PHP predefined variable, but it would be nice to work with something more dynamic and inclusive of all search engine user-agents.
Any suggestions on the best technique and/or approach here?
Thanks in advance!
Thing is, based on this method, you could serve up any content based on what you *think* is a SE... this could include content that does not relate directly to your site, but would purely help to boost your SE ranking - afterall, that is what you are trying to do. If the SE's were to find this out, this *could* be judged as trying to artificially boost your ranking (IMHO), and could lose your ranking completely?! But how would the Search Engines know the difference?
What if they spidered your site using a perfectly normal user-agent and compared the results of the two?! - user-agents are easy to fake right?!
This is just a thought - I've not tried or even considered this method before - but would also be interested to hear from others on this matter.... fair game? Is it safe?
The User Agent check is somewhat of a hack, yet the only other way to generate non-Ajax content on the same page (without redirecting to another page) for search engines is to use the <noscript> and <script> tags to render content.
However, the problem with this approach is that Javascript is only executed upon initial page load, and not on Ajax invoked div tag reloads.
I'm still struggling to find a good, usable solution here...