Reputation: 49384
If am using $_SERVER['HTTP_USER_AGENT'];
to detect if the browser is a mobile browser or not and not displaying the page if it's not a mobile browser.
It works fine but I have a local page that I want to use with an iframe to display the content of the page.
Is there a way to create an exception where my local page is about to display the content on a desktop browser?
For example:
If page is displayed by my local page inside the iframe then bypass the mobile browser restriction.
Any ideas if this can be done at all?
Upvotes: 1
Views: 371
Reputation: 174957
Have a session variable set on the large page and check for that in the page in the frame. If the session variable is set, display the desktop version.
Upvotes: 3