H
H
hloya_ram2018-11-19 13:45:29
PHP
hloya_ram, 2018-11-19 13:45:29

Can a php script (which returns json) received by ajax request set a cookie?

An ajax request is made to a php script that returns json.
Is it possible to make a php script create a cookie in the browser when making a request to it?

If yes, then in what way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2018-11-19
@hloya_ram

Yes. An AJAX request and response is no different from a normal page request via the browser's address bar.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question