Hiding Cookie Expiry for Newspaper Theme

Posted in: Newspaper
Post count: 80

Hi there, just a quick question.

I notice the theme uses cookies under tagdiv_theme.js and tagdiv_theme.min.js.

It is telling my visitors the time/date that the cookie will expire. See below. I want to hide this information. What can I do to hide it?

Set-Cookie: …; expires=Tue, 18-Apr-2017 06:02:27 GMT;

I have dug out the corresponding code under tagdiv_theme.js, can I just delete some parts of this code to hide the above cookie expiry time/date?

function td_set_cookies_life(td_time_cookie_array) {
var expiry = new Date();
expiry.setTime(expiry.getTime() + td_time_cookie_array[2]);

// Date()’s toGMTSting() method will format the date correctly for a cookie
document.cookie = td_time_cookie_array[0] + “=” + td_time_cookie_array[1] + “; expires=” + expiry.toGMTString() + “; path=/”;

Post count: 22421

Hello,
You can try to delete some parts of the code. That is the only place cookie expiration is found. You can remove the time if you want to but mind the syntax in order not to break the rest of the js code.
Thank you!

Post count: 80

Hi Bogdan, thanks for the advice above. Can you indicate which part of the JS code pertains to cookie expiry time? I delete the part on expiry.toGMTString() + but the expiry time/date still shows up in the website’s headers.

Set-Cookie: …; expires=Tue, 18-Apr-2017 06:02:27 GMT; …

Post count: 23312

Hello leapdsc,

Unfortunately, this task involves such more additional customizations through the code and we cannot provide this type of services at the moment, sorry! If you are not aware of the steps which are required to make, please consider hiring a freelancer/developer to help you because we cannot provide custom services at the moment, sorry!

Thanks for the message!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.