South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
Just curious if this is worth knowing.
Would this not make it slower as it happens on the server?
Code:if ( $detect->isMobile() ) {* }* // Any tablet device.if( $detect->isTablet() ){ *}
By definition if you're using server side code to change the display then you are no longer using a "responsive" design, but are actually using an "adaptive" design.
Any code you add will make it "slower" just depends how much and that mobiledetect class works well.
You can render it server side, but you will need to design your application from the ground up with isomorphic in mind.
If you need to decide server-side on how to render front-end, then your architecture is wrong.
Html 5, AMP or bootstrap will sort you out. Server-side I would focus on caching, compression, security but not on presentation.
If you need to decide server-side on how to render front-end, then your architecture is wrong.
Html 5, AMP or bootstrap will sort you out. Server-side I would focus on caching, compression, security but not on presentation.
I always say "go with responsive", as it is the most reliable way of getting it to work on as many devices as possible, without making specific considerations on the server. If the site is big, and needs to serve slightly different content or if it uses a completely different navigation system, then you could use responsive for PCs and tablets, and then a mobile site for phones. Capitec does this. See what happens when you scale down the Capitec site.
If you need to decide server-side on how to render front-end, then your architecture is wrong.
Html 5, AMP or bootstrap will sort you out. Server-side I would focus on caching, compression, security but not on presentation.