Jump to content

Caching problem on index?


solidsteak

Recommended Posts

Hi,

 

I'm using a simple if statement in the template to detect if mobile using $mobile_device assigned in FrontController.

{if $mobile_device}
  A
{else}
  B
{/if}

Something very strange happens. The variable seems to change back and forth regardless of device at each upload of the file I'm using it in. So if I upload initially, it will display 'A'. If I make no changes and update the file on the server, it will display 'B'. Do it again, and it goes back to 'A'.

 

And if I include {debug}, everything works perfectly. Mobile shows 'A' always, and everything else 'B'.

 

What is happening here? I'm assuming something to do with the cache. I'm using the variable in a module tpl (homeslider), would that be the issue?

Edited by solidsteak (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...