POST:admin-ajax.php bad request

Our website has a request which takes is over half the website load time. The POST area of gtmetrix says action=porto_refresh_cart_fragment, but we have no cart so it’s pointless & also a 400 bad request.

I have tried the following to disable this code:

heartbeat control plugin
speed drain repair plugin
disable cart fragments

Adding custom code to the functions.php to dequeue.

The only way I can get rid of it is to allow autoptimize to insert js into the head & turn off fix render blocing on wp fastest cache premium. That gets rid of it, but we then have 3 render blocking js & css.

Source code has the following:

<script type=”text/javascript”>var wpfc_ajaxurl = “”;</script>
<button id=”responsive-menu-button”
class=”responsive-menu-button responsive-menu-boring

<span class=”responsive-menu-box”>
<span class=”responsive-menu-inner”></span>

</button><div id=”responsive-menu-container” class=”slide-left”>
<div id=”responsive-menu-wrapper”>


/* <![CDATA[ */
var js_porto_vars = {“rtl”:””,”ajax_url”:””,”post_zoom”:”1″,”portfolio_zoom”:”1″,”member_zoom”:”0″,”page_zoom”:”0″,”container_width”:”1170″,”show_sticky_header”:”0″,”show_sticky_header_tablet”:”1″,”show_sticky_header_mobile”:”1″,”request_error”:”The requested content cannot be loaded.<br/>Please try again later.”,”ajax_loader_url”:”://”};
/* ]]> */


var wysijaAJAX = {“action”:”wysija_ajax”,”controller”:”subscribers”,”ajaxurl”:””,”loadingTrans”:”Loading…”,”is_rtl”:””};
/* ]]> */

Read more here:: POST:admin-ajax.php bad request

Leave a Reply

Your email address will not be published. Required fields are marked *