-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detection is inefficient #40
Comments
The modified function should be like this:
|
@ielmin please submit your change via github so a) you get credit for it, b) we can easily see what you actually changed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using this module and there is an issue with detection. Bu I needed to optimize it for my own use because it each time when is_mobile is called, does the same checking to see if it is mobile or not. In reality, if something is not a mobile, it can not change itself during the user session to become a mobile. So, once the detection is done, it should be stored in a session to return the previous evaluation result if the session is set.
Doing so much string match, search, etc with headers to identify user agent etc, is not very efficient for php. So, can just keep in session once it is done. and this user will be marked as mobile during this session. I hope you consider this one in your next release or update.
The text was updated successfully, but these errors were encountered: