CHANGE: We now include the _escaped_fragment_ support by default, but

only if the crawler check fails. It is a fallback for non-google search
engines that support the Ajax crawling API.
This commit is contained in:
Robin Ward
2014-02-20 17:02:26 -05:00
parent c4b5455c21
commit d95887c57d
17 changed files with 82 additions and 21 deletions

View File

@ -49,10 +49,6 @@ class TopicsController < ApplicationController
redirect_to_correct_topic && return if slugs_do_not_match
# render workaround pseudo-static HTML page for old crawlers which ignores <noscript>
# (see http://meta.discourse.org/t/noscript-tag-and-some-search-engines/8078)
return render 'topics/plain', layout: false if (SiteSetting.enable_escaped_fragments && params.key?('_escaped_fragment_'))
track_visit_to_topic
if should_track_visit_to_topic?