0

I have a plugin which displays a map with markers. Using SetInterval I am refreshing the markers at a pre-determined interval using an ajax call.

It is only reading data, no updates.

I am using a nonce, the same nonce repeatedly, as WP Nonces are not single use. But they do expire.

If the screen is left on overnight, the nonce will eventually expire and I will start getting lots of error emails.

Should I re-issue the nonce once used, and pass the new nonce back through the json object returned by the ajax called function?

Or should I not use a nonce at all for this as we are only reading?

Thank you.

  • Use nonces for users who are logged in only. Is that the case? If not, you don't need a nonce, because it's the same for all users. – fuxia May 23 at 13:49
  • Thanks - the user is not logged in for this, so I shall remove the nonce. Thank you – StripyTiger May 23 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.