2

Quick question: Is it possible to access the browser's local storage in Twig?

In JavaScript you would do something like:

localStorage.getItem('myItem');

Thanks!

1 Answer 1

6

No. Twig gets compiled into PHP and is run entirely on the server.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.