The website loads via Ajax
Could you explain what that means, in a little more detail, please?
If you could also share a link to the site, that would be helpful.
Hey Raam,
Please see here
You won’t see the error in the title at first but if you click on the pages and then hover over the title you will see the warning message.
Thanks
From this URL retrieved via AJAX:
view-source:http://bandhbuildings.com/bookings/?info=title
I find the following…
Bookings | B&H Buildings | Bourne & Hollingsworth Buildings Restaurant
<!-- Quick Cache is NOT caching this page, because <code>$_GET</code> contains query string data. The current configuration says NOT to cache GET requests with a query string. -->
@aminabbasian What version of Quick Cache are you running please?
Hey Jas,
I am using Quick Cache Version 141001 on WP 4.0
Thanks
Thank you! 🙂 I suggest upgrading to the latest release of Quick Cache, just to make sure that everyone is on the same page here. The latest release at this time is v150129.
That won’t solve the problem though. The reason this occurs? The AJAX response is coming back with a Content-Type: text/html; charset=UTF-8 header. So Quick Cache thinks this is “HTML”, when in fact your JavaScript routines are treating it as plain text.
So there are two possible solutions:
1. Change the AJAX response so that it sends back Content-Type: text/plain; charset=UTF-8.
2. Or, update your JavaScript routines so that you treat the response as HTML; i.e. so that HTML comments are treated as such; i.e., not as part of the plain text.
I’m opening an issue about this, so that we can try to work around this problem in a future release. See: https://github.com/websharks/quick-cache/issues/410
Thank you 🙂
I will try the two potabilities asap.
In the meantime is there away in which I can hide this error?
The quickest way to hide it would be:
Option 2 that I listed above.
Or, to use a .replace() call in JavaScript. That’s a bit hackety though, and if you’re in the JS code already, it would probably be easier just to correct the way you handle the AJAX response. For instance, if you’re using jQuery… instead of doing $([selector]).text(response), do $([selector]).html(response).