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!

4

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

Your Answer

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

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