0

I want to store feed(getting feed from url in xml format) data in localStorage to use it further in all page by fetching local storage data in phtml.

Currently I am using below code in Category(eg. New) -> Menu -> Left Block:

{{block class="Magento\Framework\View\Element\Template" template="Namespace_ModuleName::left_block.phtml"}}

to display sub-menu items on menu hover, Namespace_ModuleName::left_block.phtml contain logic to fetch the data.

But here I am facing one cache issue, in some page feed data is different as feed is being update.

So I want to store feed data in localStorage and use it phtml.

Anyone used localStorage other than customer module?

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.