Mobile Joomla Pro sends Vary: User-Agent

berprado
10 years, 10 months ago
Hi,

The mobile joomla pro adds 'user-agent' to the Vary response header. This is a really, really bad thing to do as it means any downstream caches will have to maintain a separate cache-copy for every single user-agent that accesses the site. Basically it means any site behind a CDN might as well not have the CDN there.

Similarly, anyone running Varnish is going to have similar issues.

I think I can see why you've added it - to ensure that a mobile device never gets served a desktop page (and vice-versa). My aim is to remove this header from the plugin, but I need to understand exactly what the logic for adding it was so that I can create an appropriate alternative (i.e. minimise the impact).

Could you explain what you were hoping to achieve? Obviously any changes/improvements will get contributed back.

Thanks
dryabov
10 years, 10 months ago
It's because of detecting of mobile mode (desktop, smartphone, iphone, or tablet) is based on User-Agent header. I don't know other way to prevent incorrect serving by proxies.

In the case of Varnish it would be possible to write vcl_recv subroutine to detect device type, but it is specific case, so I think that Vary: User-Agent should be enabled by default. And anyway, it is not easy to transform mobile detetcting plugins to Varnish subroutine (if possible).

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.