• Resolved luismoyano

    (@luismoyano)


    Hi there,
    I’m using the following code:

    $detect = new TinyWP_Mobile_Detect;
    if ($detect->isMobile()) {
      $image = IMAGE FOR MOBILE
    } else {
    	# imagen de 1070px por lo que sea
    	$image = IMAGE FOR DESKTOP
    }

    I’m still on vacation working in my laptop and my laptop is detected as mobile?
    It’s a Macbook Pro. Could it be? It’s really weird!
    Let me know!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter luismoyano

    (@luismoyano)

    Hi again,
    Sorry, but forget this topic.
    It was working fine.
    The issue was on my end.

    My website is being cached. So the first device that visits the page saves it in the cache with the values of that device. When I visit the page again from another device, it shows the cached page, and that’s why it showed my laptop as “mobile”.

    I will not be able to use the plugin, but I confirm that it works correctly.

    Thank you!

    Plugin Author Pothi Kalimuthu

    (@pothi)

    Glad to know the plugin still works. Thanks for the heads-up.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Detecting Laptop as mobile’ is closed to new replies.