Request object is cached in dispatcher
Hi Team,
We have a requirement to separate mobile and desktop code, we we are using user-agent to get the device details from the backend and using that conditionally in sightly to render the device specific code.
useragent = request.getHeader("User-Agent");
We can get the device details correctly.
In author its working as expected, when we open the page in desktop - its giving the device type as desktop, if we inspect the page and change the device as mobile in emulator and refresh the page - its showing as mobile.
But in the dispatcher, when we open the page in desktop - its giving the device type as desktop, but if we inspect the page and change the device as mobile in emulator and refresh the page - its still showing as desktop only. If we navigate to any other page, then its showing as mobile.
And then when we switch to desktop and refresh the page, it still shows as mobile for that page - when we navigate to any other page, then it shows as desktop.
When we open any page, that particular request is getting cached, so even when we switch to any other device in emulator and refresh the page, the same request is being served.
@Vijayalakshmi_S @arunpatidar @Suraj_Kamdi