Say a user visits your site on an old blackberry with styl开发者_如何学Pythonesheets off (and probably javascript off as well). How would you go about detecting if a browser was applying stylesheets or not?
The best you could probably do would be to find out what the browser is and from that, see what it's capable of.
I suggest you start looking at $_SERVER['HTTP_USER_AGENT']
but you can go quite a bit deeper with get_browser()
.
Either way, as long as your markup makes sense (eg you use headers, hrs, paragraphs, em and strong, etc instead of meaningless CSS classes) a css-less browser should be able to render your content sensibly.
There's no way to detect that from the php's side.
精彩评论