Drupal 7 Boost is creating but not serving cached pages - drupal-7

I have a Drupal 7 site and I installed Boost which I have installed successfully on other sites. On this specific site, Boost is creating the cached pages but not serving them. I'm able to navigate to the cached pages using www.mysite.com/cache/normal/mysiteURL/cachedpage.html and the cached page displays correctly. I thought the problem might have been that the pages were being re-cached with every request but I checked and the cached pages appear to be remaining for the expiration period I've set so they are not being re-cached.
Can anyone suggest why Boost is able to create the cached pages but the system is not serving them?
thanks,

You need to switch off drupals builtin 'cache pages for anonymous users'. And after this you empty cache. Boost will only work for anonymous users, be aware of it.

Related

Caching problem on Azure CDN + Cloudflare structure

Our site is being made available with the following structure:
Static Blob Container Azure > CDN > Cloudflare > User.
The React app build is made available in an Azure Static Blob Container that is accessed by an Azure CDN. When we access the app via the CDN URL, we never have a cache problem. We also use cloudflare to manage the DNS and supposedly improve the cache. But when we access the app through cloudflare, we have a serious cache problem, returning extremely old versions for users who have accessed the site before.
Even after turning off all cache options available in Cloudflare's dashboard and its graphics show that cache consumption has dropped, the bug still persists. We were unable to identify where our problem is in the structure mentioned above.
The problem is because a CDN uses multiple nodes to serve the content. The proper way to 'solve' this is appending a version in the filename or path, this way, whenever you need to change something, the CDN will download the latest version. Just using a regular 'app.js' is not enough.
More info:
How to force the browser to reload cached CSS and JavaScript files
https://stackoverflow.com/a/34604256/1384539

Exporting DNN news to other systems using 2sxc module

Currently we are using DNN to implement and manage our company websites. Therefore we own several websites and one 'head'-website. Each of the sites contains its own DNN installation. For creating news we are using the 2sxc module.
Now we have the following tasks: If a user creates new news in one of the websites, we want to export them automatically to
another installation of DNN (to the 'head'-website)
another system (self developed application)
So is there any opportunity, e.g. an API or another module to realize that?
Thank you very much for your answer in advance!
I would consider doing this another way.
Create a new installation or site in which you create and store all news items. Add an RSS feed or a webapi to this site, and create methods such that other sites can grab news items from this site.
Modify your other sites to use the webapi (or RSS feed) from the news source for their displays. This should be quite easy for the sites that use 2sxc. You'll just need to change the data source to get data from the webapi or RSS feed.
This will eliminate issues of duplicating data, etc.
If you want to reduce development, you could get a copy of DNN Sharp's API Endpoint module(https://www.dnnsharp.com/dnn/modules/custom-dnn-api-endpoint). They have pretty good documentation, and YouTube videos to walk you through the creating of endpoints.
2sxc has everything you need :)
Your best bet is probably the REST API to access the items (see https://docs.2sxc.org/how-to/webapi/webapis.html and https://2sxc.org/en/learn/rest-for-javascript). Just activate some permissions and you can get them from anywhere. Here's a basic recipe to configure the permissions: https://azing.org/2sxc/r/k0YbVYXO
You can also create queries (like to only give the the last 5) and set permissions on that, using https://azing.org/2sxc/r/BE0HbDwA.
This blog post may also help you: https://2sxc.org/en/blog/post/releasing-2sxc-8-10-public-rest-api-visual-query-and-webapi-shuffle-datasource

Prerender caching risks Google cloaking penalty?

Following some trouble getting the Google Crawler to parse our AngularJS site, we're using Prerender to serve a crawler-friendly version of our pages.
This has worked well - except Webmaster Tools indicates that our site speed has worsened considerably, due to Prerender's latency. We're concerned this will impact ranking.
So two questions:
Does Google use the Prerender pages in measuring site speed - or the (true) Javascript-enabled version of our site? We suspect it's the former.
One possible solution is to cache the Prerendered pages. However these cached pages may not perfectly match what the user sees, due to the time delay between the page being put into cache and returned to the crawler - e.g. we may add additional products to the page and the title/metatags reflect the number of products available at any one time. Are these small differences to title, meta descriptions and page content sufficient to risk a cloaking penalty? If so, what is the alternative to caching?
Many thanks for any help.
When it comes to crawl speed, Google uses the Prerender page response time. This is why it's important to cache your pages so that the Prerender server doesn't have to load the page in the browser each time. Returning cached pages will make Googlebot crawl your site very fast.
As long as you are using the ?_escaped_fragment_= protocol and not matching on the Googlebot user agent, you won't be penalized for cloaking even if the pages differ in the ways you mentioned. Just don't match on the Googlebot user agent and don't try to pad your Prerender pages with keywords and you'll be fine.

Fetch as Google Webmaster tools

I have an AngularJS SPA site which I wanted to test using google's "Fetch as Google" feature in webmaster tools. I am a little confused about the results. The screenshot from Googlebot looks correct however the response doesn't include any of the contents inside the "ui-view" (ui-router)... can someone explain what is happening here? Is google indexing the site properly since the screenshot is correct? Or is google not able to execute the JS properly for indexing?
This is a mixed bag. From some tests I've seen the GoogleBot is able to index some of the AJAX fetched content in some cases. A safe bet though to make all the search engines happy is to use prerender.io or download their open source stuff (uses PhantomJS) to have your site be easily indexable. Basically what this does is saves the version of your site after async operations have completed for a given URL and then you setup a redirect on your server that points any of the potential bots for search engines over to the preprocessed page. It sounds pretty complicated but following the instructions on the site it's not too hard to setup, and if you don't want to pay for prerender.io to serve cached copies of your pages to search engines you can run the server component yourself too.

Can Google be used for site search on a database backed website?

I'm developing a web site with Google App Engine, and I want to have a search feature for user submitted stuff. Since this project is just a toy and I don't control the server, I'd like to just use Google to handle search. However, since the content is stored in the database, I don't think Google can discover the dynamic urls. Unless maybe I create a page that links the last N submissions and hope it gets crawled frequently. Thoughts?
Absolutely. As long as the database is exposed in a web page which can be crawled, Google will crawl it (unless told not to).
The best way to make it all accessible is decent navigation between pages. However, lacking that, a site map page linked from the home page should suffice.
This is an excellent candidate for a sitemap.
You can generate the XML any way you want, and give it to Google. The best part is, it is a "private" XML file; no need to have ugly listings of dynamic URLs for users to see.

Resources