Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    No, it’s not necessary. It is just the cache plugin’s issue. Check the cache plugin’s settings, don’t cache pages with GET variables if possible.

    Thread Starter BellaBerlin

    (@bellaberlin)

    The cache plugin does not cache pages with GET variables, but this is not the problem. The ajax call happens on every page that has a contact form, e.g. on https://www.yetim.de/. I just want to remove the ajax call, because it can’t be necessary for a simple form that has no captcha or anything.

    The ajax call is caused by Contact Form 7 in scripts.js:

    $.fn.wpcf7OnloadRefill = function() {
    		return this.each(function() {
    			var url = $(this).attr('action');
    			if (0 < url.indexOf('#'))
    				url = url.substr(0, url.indexOf('#'));
    
    			var id = $(this).find('input[name="_wpcf7"]').val();
    			var unitTag = $(this).find('input[name="_wpcf7_unit_tag"]').val();
    
    			$.getJSON(url,
    				{ _wpcf7_is_ajax_call: 1, _wpcf7: id, _wpcf7_request_ver: $.now() },
    				function(data) {
    					if (data && data.captcha)
    						$('#' + unitTag).wpcf7RefillCaptcha(data.captcha);
    
    					if (data && data.quiz)
    						$('#' + unitTag).wpcf7RefillQuiz(data.quiz);
    				}
    			);
    		});
    	};

    Same problem here. Any news?

    Since it’s only used to specific fields in a form, could you check if such fields exist on a form before making the call? I guess that wouldn’t be hard to implement and performance would improve a lot.

    Thanks for your plugin and thanks in advance.

    Regards.

    I too would like a solution for this ??

    I’ve cheated by copying the script.js file and commenting out line that called wpcf7OnloadRefill.

    Same problem

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Eliminating ajax call ?_wpcf7_is_ajax_call=1…’ is closed to new replies.