Title: Remove ajax.php ?
Last modified: June 2, 2021

---

# Remove ajax.php ?

 *  Resolved [Luca Eberhardt](https://wordpress.org/support/users/izteberhardt/)
 * (@izteberhardt)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/remove-ajax-php/)
 * Good day,
 * we would very much like to use the PlugIn for our site.
    We tried it on our mirrored
   site and a script unfortunately triggers the employee login to appear for everyone:
 * /* <![CDATA[ */
    var moove_frontend_gdpr_scripts =. {“ajaxurl”:”\/wp-admin/admin-
   ajax. php”, “post_id”: “4833”, “plugin_dir”:”\/wp-content\/plugins\/gdpr-cookie-
   compliance”, “show_icons”: “all”, “is_page”:””, “strict_init”: “1”, “enabled_default”:{“
   third_party”:1, “advanced”: 0},”geo_location”:”false”,”force_reload”:”false”,”
   is_single”:””,”hide_save_btn”:”false”,”current_user”:”0″,”cookie_expiration”:”
   365″,”script_delay”:”2000″,”wp_lang”:”_en”}; /* ]]> */
 * wp-admin\/admin-ajax.php
 * var moove_frontend_gdpr_scripts
    “ajaxurl”:”\/wp-admin\/admin-ajax.php
 * Is there any way to remove the script and if so where?
 * Best regards and thanks in advance!
    Luca Eberhardt

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Moove Agency](https://wordpress.org/support/users/mooveagency/)
 * (@mooveagency)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/remove-ajax-php/#post-14526710)
 * Hi [@izteberhardt](https://wordpress.org/support/users/izteberhardt/),
 * Thanks for using our plugins.
 * Our plugin works with AJAX, you can disable the AJAX by adding the following 
   code snippet to your functions.php
 * `add_action( 'gdpr_cc_prevent_ajax_script_inject', '__return_true' );`
 * The hook above doesn’t remove the ‘ajaxurl’ from `moove_frontend_gdpr_scripts`
   variable, but in this case you can remove safely by adding another filter to 
   functions.php
 *     ```
       add_action( 'gdpr_extend_loc_data', 'my_gdpr_extend_loc_data', 20, 1 );
       function my_gdpr_extend_loc_data( $loc_data ) {
       	unset( $loc_data['ajaxurl'] );
       	return $loc_data;
       }
       ```
   
 * Hope this helps.
 *  [briandd](https://wordpress.org/support/users/briandd/)
 * (@briandd)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/remove-ajax-php/#post-14596229)
 * Hi
 * Any specific reason why it is requiring ajax? It is multiplicating the number
   of requests that the clients do, on every page load, the client does an additional
   request to admin-ajax.php , even if you accept the banner
 * I think other plugins use mostly javascript (including to handle cookies), to
   avoid showing the banner again, and all the banner settings are directly in the
   page content, then it avoids doing more requests

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Remove ajax.php ?’ is closed to new replies.

 * ![](https://ps.w.org/gdpr-cookie-compliance/assets/icon-256x256.png?rev=2376316)
 * [GDPR Cookie Compliance - Cookie Banner, Cookie Consent, Cookie Notice for CCPA, EU Cookie Law](https://wordpress.org/plugins/gdpr-cookie-compliance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gdpr-cookie-compliance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gdpr-cookie-compliance/)
 * [Active Topics](https://wordpress.org/support/plugin/gdpr-cookie-compliance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gdpr-cookie-compliance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gdpr-cookie-compliance/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 2 replies
 * 3 participants
 * Last reply from: [briandd](https://wordpress.org/support/users/briandd/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/remove-ajax-php/#post-14596229)
 * Status: resolved