Monday, 8 October 2018

Automatically force mobile browser to desktop view

Having completed a lot of work on a project that uses Paypal IPN to initiate payments, I've found that this is successful on a desktop browser, but fails completely 100% on mobile (on Chrome, at least).

After some research, I've found that this is due to the mobile browser using the GET method for returning Paypal data, as opposed to the desktop using POST.

If I click on 'Request Desktop View' on the mobile browser then this will allow the process to complete properly, but this is obviously not great fun for the end-user.

So, as I've come to a bit of a dead end with this (I've actually been advised it's a Paypal issue that there's no control over - not sure if true or not), is there a way to automatically force the desktop view on a mobile browser as a last resort?

I've tried to change the viewport width (<meta name="viewport" content="width=1024"> ), but all this does is widen the mobile browser view. It doesn't actually give the proper desktop view as you would get by clicking on 'Request Desktop View' manually.

Would anyone know if there's a way to force to desktop view via HTML or JS, please?

Thanks,
Dan.



from Automatically force mobile browser to desktop view

No comments:

Post a Comment