1

This question originates from my post on MyBB support forum. It's been a few days so I figured I should ask somewhere else too.

I want to prevent the search engines from offering the Cached version of my pages and I want the code to work across the entire MyBB forum which is using 1.8.10. I found this at HTMLGoodies.com:

<meta name="robots" content="noarchive">

It's very very old so do we need to change it at all to use it in 2017? I found this at WillMaster.com:

<meta http-equiv="cache-control" content="max-age=0">

http://www.willmaster.com/library/web-content-prep/preventing-browser-cache.php

and supposedly it will work across all browsers which sounds way better than the first code. Lastly I found this at Tech-FAQ.com:

<meta http-equiv=”Pragma” content=”no-cache”>

http://www.tech-faq.com/prevent-caching.html

But they mention it's for web hosts and is a server-side solution. So I don't know if they mean this code is intended for say, HostGator, or if it's for anyone who has access to their site's code.

Which of these should I use? Where is the code I have to change located and can you show a screenshot of the code before and after the changes? I found headerinclude in Ungrouped Templates but there is no <head> tag anywhere.

Edit: Only the first line of the last two codes was showing up here so I added a link to where you can see the entire code.

Edit 2: Giant embarrassing typo in the title. Fixed.

  • Possible duplicate of How do I prevent Google from serving a cached version of my site? – MrWhite Apr 21 '17 at 22:38
  • You were correct in your first code snippet: noarchive. Stop there, that's it, there is no more to it. The rest of your question is about client-side browser caching - which is something completely different and doesn't really have anything to do with with search engines (apart from potentially making your site "quicker"). – MrWhite Apr 21 '17 at 22:41
  • "...and supposedly it will work across all browsers" - Why do "browsers" matter here? I thought you wanted to prevent "search engines" from offering the "Cached" (aka "Archived") version of the page? – MrWhite Apr 21 '17 at 22:50
  • 1
    Thanks for posting here! Do you want to post your first comment as an answer? – mybbxoxo Apr 22 '17 at 0:25
1

You are correct in your first code snippet:

<meta name="robots" content="noarchive">

Stop there, that's it, there is no more to it. Once the search engines (Google) recrawl your site then this should prevent them offering the "Cached" (or "Archived") version of the page in the SERPs.

Nothing has changed in recent years in regards to this value. From the relevant Google help document:

noarchive: prevents Google from showing the Cached link for a page.

The rest of your question is about client-side browser caching - which is something completely different and doesn't really have anything to do with search engines (apart from potentially making your site "quicker").

0

try to use a robots.txt in the root or something with the htaccess (I know this isn't too helpful but it's something)

EDIT

the way mybb forums are built is out of very tangled and confusing php, wouldn't recommend sifting through the all of that (to keep the cache away by a tag it has to be in EVERY page, and the way this forum tool is built it does not have a head or a body tag in the file so there is almost no way to do it through each file, once again if you can use the htaccess or a robots.txt

  • robots.txt prevents crawling, so this would be very bad, unless you want to remove pages from the search results!? The question seems to be a bit "confused" - the initial question is about preventing search engines offering the "Cached" (aka "Archived") version of pages in the SERPs. But then the question starts discussing client-side browser caching - which is something completely different?! – MrWhite Apr 21 '17 at 22:56
  • I didn't understand that the second and maybe third codes are for "client-side browser caching". My title is definitely correct for what I want to do. And thanks for clarifying the robots thing, I definitely DO NOT want to stop my forum being crawled. – mybbxoxo Apr 22 '17 at 0:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.