1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Google's sitelinks search box

Discussion in 'Troubleshooting and Problems' started by William Harvey, Oct 9, 2014.

  1. William Harvey

    William Harvey New Member

    Hi all,

    I'm new with the forum and have just noticed that search queries are cached.

    I'm looking in to implementing Google's sitelinks search box as detailed here: https://developers.google.com/webmasters/richsnippets/sitelinkssearch

    To implement it you need a non caching search system.

    Google ask for the following as part of a js script.

    But the forum uses "/index.php?search/7/&q=ajax", with the /7/ being the cache.

    If I implemented Google's code as

    It always reverts to the /7/ cache for whatever the search phrase is.

    Does anyone have any suggestions regarding this?

  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. William Harvey

    William Harvey New Member

    Thanks Jake, I added the return false; to line 99 and no luck. It still seems to be redirecting to /search/24/?q=applications&o=date

    Even though I used the URL as suggested: /index.php?search/search/&keywords=applications

    So it must be caching somewhere.

    Any ideas?
  4. William Harvey

    William Harvey New Member

    OK, I followed the instructions in detail but 1.4 still redirects to the cached version and starts at 1 after the Truncate.

    I see that xenforo have this enabled and working so there must be a solution here.

    Would you know how this board managed to stop the caching?

  5. Mike

    Mike XenForo Developer Staff Member

    Caching wasn't disabled. The search is just pointed to the actual search request (which redirects to the results, which are cached). This is totally expected.
  6. William Harvey

    William Harvey New Member

    Ahh, ok.

    Many thanks for this.

Share This Page