talan3000 Posted December 19, 2007 Share Posted December 19, 2007 I know this site is for the high speed hackers but I can't get an answer anywhere else and I figure if none of you guys know then it's probably not possible. The question is; can you have a css page dynamically imported into a web page. Opposed to redirecting a browser to a web page for compatibility purposes I think it would be much more efficient to keep the page the same and have the page import the style sheet that makes the page compatible with the particular browser. I know php allows you to upload random images to your pages, I just need to know if it's possible to detect a browser and upload the appropriate style sheet. Quote Link to comment Share on other sites More sharing options...
chigley Posted December 19, 2007 Share Posted December 19, 2007 Look at the $_SERVER array and you can parse the user agent to detect the browser. Then you can just echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"{$url}\">"; once you've calculated the correct URL. Quote Link to comment Share on other sites More sharing options...
jvrothjr Posted December 19, 2007 Share Posted December 19, 2007 So you want php to detect the browser and based on that which ccs style sheet to load? if thats the question yes you should be about to do this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.