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 = “https://www..co.uk/wp-admin/admin-ajax.php”;</script>
<button id=”responsive-menu-button”
class=”responsive-menu-button responsive-menu-boring
responsive-menu-accessible”
type=”button”
aria-label=”Menu”>

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

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

Also

/* <![CDATA[ */
var js_porto_vars = {“rtl”:””,”ajax_url”:”https://www..co.uk/wp-admin/admin-ajax.php”,”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”:”://www..co.uk/wp-content/themes/porto2/images/ajax-loader@2x.gif”};
/* ]]> */

&

var wysijaAJAX = {“action”:”wysija_ajax”,”controller”:”subscribers”,”ajaxurl”:”https://www..co.uk/wp-admin/admin-ajax.php”,”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 *