The comments on this blog were abnormal after Qiniu Cloud CDN acceleration was enabled yesterday, and there was a problem that you cannot comment.
After searching on the Internet, I found a solution in Shimeng blog.The reason why the Mockingbird start theme is accelerated by Qiniu Cloud CDN, which leads to the invalidation of Ajax comments, is that the theme uses Ajax comment effects, while the comments-ajax.js file and comments-ajax-qt.js file are cached on the Qiniu server, which leads to the failure of Ajax comments.
Method 1: Modify the comments-ajax.js file
Find the following code in the comments-ajax.js file:
Pay attention to changing to your own seven cow acceleration address and website address.Among them,Change cdn.wosn.net to the secondary domain name provided by your Qiniu, and change wosn.net to your WordPress site domain name。
Then delete the comments-ajax.js file in Qiniu's cloud acceleration and re cache it to solve the problem of invalidation of Ajax comments caused by the use of Qiniu's cloud cdn acceleration for the robin start theme.
Method 2: Add cdn image exceptions
The above method modifies the js file method, but it takes too long to take effect. Qiniu still has a process of refreshing the cache, and can't see the effect immediately.The following method is to directly exclude the js file from the image list. Although one more js file is added when loading, the effect is immediate.
This blog uses the wp super cache plug-in to add images. The addition exclusion is shown in the following figure:
I make a record myself and hope it can help everyone.
This article is written byWatson BlogPublished on August 12, 201702:19:54
This article is collected and sorted by the website of Mutual Benefit, and the email address for problem feedback is:wosnnet@foxmail.com, please keep the link of this article for reprinting:https://wosn.net/1.html