browser detection
browser detection
I was just wondering if anybody knew of any plugins for browser detection. It's only so that i can put a small notice on my page if a user is using an older browser. As i haven't font much testing in early versions of ie etc. I did have a Google for it, couldnt find anything definitive
Re: browser detection
What do you mean by plugins ?
http://www.google.co.uk/search?hl=en&q= ... +detection
First links seems like what you want ?
http://www.google.co.uk/search?hl=en&q= ... +detection
First links seems like what you want ?
Re: browser detection
Try not to use PHP for that if you don't need it to pre process the page. It will demand server resources that is not needed.
Have a look at this w3schools link. You have it all in Javascript here:
http://www.w3schools.com/js/js_browser.asp
Else, the browser name is simply contained in a variable which you ca find on this page:
http://php.net/manual/fr/reserved.variables.server.php
Good luck.
Have a look at this w3schools link. You have it all in Javascript here:
http://www.w3schools.com/js/js_browser.asp
Else, the browser name is simply contained in a variable which you ca find on this page:
http://php.net/manual/fr/reserved.variables.server.php
Good luck.
Re: browser detection
Hmmm, it would appear that I chose to ignore that link. Possibly because it had quirks mode in the url. thanks
Re: browser detection
Hmm, who do you make websites for? Yourself, or your users? Why would you use extra processing power of your visitors' PC rather than using server resources which you already pay for?conradk wrote:Try not to use PHP for that if you don't need it to pre process the page. It will demand server resources that is not needed.
Have a look at this w3schools link. You have it all in Javascript here:
http://www.w3schools.com/js/js_browser.asp
Else, the browser name is simply contained in a variable which you ca find on this page:
http://php.net/manual/fr/reserved.variables.server.php
Good luck.
Re: browser detection
Well, ok, it depends on what kind of hosting you're on. I'm on shared hosting (max 20 request at the same time...). If you have a dedicated server, these things should be in PHP, but if not, Javascript will usually be faster, don't you think ?libeco wrote:Hmm, who do you make websites for? Yourself, or your users? Why would you use extra processing power of your visitors' PC rather than using server resources which you already pay for?conradk wrote:Try not to use PHP for that if you don't need it to pre process the page. It will demand server resources that is not needed.
Have a look at this w3schools link. You have it all in Javascript here:
http://www.w3schools.com/js/js_browser.asp
Else, the browser name is simply contained in a variable which you ca find on this page:
http://php.net/manual/fr/reserved.variables.server.php
Good luck.
Re: browser detection
You're only adding extra processing after the page has been served by using JavaScript. Granted, you won't usually notice it a lot, but generally I think it's better to stress your server a bit, than to stress the users PC...
Re: browser detection
Generally I disagree with this, the server has to serve hundreds of pages, meaning a small amount of processing added to each request will add a overall bigger effect. If you have each user work it out with their browser, the load is distributed away form the server meaning it can server more total requests.libeco wrote:but generally I think it's better to stress your server a bit, than to stress the users PC...
In this case, it would be better for the server to do it, as not everyone has javascript enabled and this is apparently something that is critical for the site to work correctly.
Also, is is normally possible to make a page look acceptable in older browsers without having to resort to detecting them and serving special styles.