javascript - How to get PHP to choose one div or another depending on device screen size -


at minute have php script outputs 'page title' div. div incorporates blur script (blur.js) , quite slow requires lots of processing.

this means pages take longer load on desktop, longer on mobile!

i can use mediaquery hide div (using display: none) , instead display simple text title, in background div still gets processed.

is there way use php choose either div or plain title, rather media query? know involve php code having know device screen size, , i'm not sure how that.

you detect mobile devices using user agent analyzer wont give screen size.

you use javascript send screen size server via ajax , store cookie or user.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -