# AVOID cookieGroups, httpCacheEnabled DATA FROM AJAX REQUEST & RESPONSE - SHOPWARE 5

**URL:** <https://forum.shopware.com/t/avoid-cookiegroups-httpcacheenabled-data-from-ajax-request-response-shopware-5/94360>\
**Category:** Plugins\
**Tags:** general, programming\
**Created:** [12. Mai 2022 um 14:44 UTC](https://forum.shopware.com/t/avoid-cookiegroups-httpcacheenabled-data-from-ajax-request-response-shopware-5/94360 "2022-05-12T14:44:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepak\_a](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@deepak\_a](https://forum.shopware.com/u/deepak_a)\
**Post date:** [12. Mai 2022 um 14:44 UTC](https://forum.shopware.com/t/avoid-cookiegroups-httpcacheenabled-data-from-ajax-request-response-shopware-5/94360/1 "2022-05-12T14:44:14Z")

</div>

Dear Developers,

```
  I have tried to implement ajax request and response in shopware 5. My code also given below.

```

**In Frontend .tpl code :**

$.ajax({  
url: ‚{url controller=ControllerName action=myCustom}‘,  
method: ‚POST‘,  
}).then(function(response) {  
console.log(response.msg);  
});

**In Frontend controller File :**

public function myCustomAction() {  
$this-\>Front()-\>Plugins()-\>ViewRenderer()-\>setNoRender();  
$this-\>Front()-\>Plugins()-\>Json()-\>setRenderer();  
$this-\>view-\>setTemplate();

```
    $this->view()->assign(array('success',true,'msg'=> 'pointadded'));return;

```

}

**Response From Controller :**

{1: true, customerpoint: „1000“, msg: „pointadded“, httpCacheEnabled: true,…}  
1: true  
cookieGroups: [{name: „technical“, label: „Technically required“,…}, {name: „comfort“, label: „Comfort functions“,…},…]  
0: {name: „technical“, label: „Technically required“,…}  
1: {name: „comfort“, label: „Comfort functions“,…}  
2: {name: „personalization“, label: „Personalization“, description: „“, cookies: , required: false}  
3: {name: „statistics“, label: „Statistics & Tracking“, description: „“, cookies: [,…], required: false}  
4: {name: „others“, label: „Others“, description: „“, cookies: , required: false}  
customerpoint: „1000“  
httpCacheEnabled: true  
msg: „pointadded“

The "cookieGroups " data comes from core file.  
File Path : engine/Shopware/Components/Privacy/CookieRemoveSubscriber.php  
Function Name : onPostDispatch

**Query :**

How to avoid unwanted data from action (like cookieGroups, httpCacheEnabled). Please share your idea.
