Where to put IE version detect code
Moderators: ooffick, General Support Moderators
Forum rules
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Fri May 12, 2017 7:34 am
Where to put IE version detect code
In Joomla 3.8.2 where to put this code (and codes like this):
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9"> <![endif]-->
I use Protostar template and would like to use with override.
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9"> <![endif]-->
I use Protostar template and would like to use with override.
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Fri May 12, 2017 7:34 am
Re: Where to put IE version detect code
Or just simply how to detect too early browser versions in Joomla (3.8.2)?
- Per Yngve Berg
- Joomla! Master
- Posts: 30919
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Where to put IE version detect code
Put it in the template's index.php where the html tag is rendered.
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Fri May 12, 2017 7:34 am
Re: Where to put IE version detect code
Thank You!Per Yngve Berg wrote:Put it in the template's index.php where the html tag is rendered.
Can you tell similar browser commands for Firefox, Chrome and Opera?
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Where to put IE version detect code
Similar "codes" (or commands) like what? Please provide some examples.adams1 wrote:Can you tell similar browser commands for Firefox, Chrome and Opera?
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Fri May 12, 2017 7:34 am
Re: Where to put IE version detect code
Similar commands to these:sozzled wrote:Similar "codes" (or commands) like what? Please provide some examples.adams1 wrote:Can you tell similar browser commands for Firefox, Chrome and Opera?
Code: Select all
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="lt-ie9"> <![endif]-->
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: Where to put IE version detect code
I don't understand your question. "Similar codes" can mean anything. What, specifically, is it about different versions of Firefox, Google Chrome or Opera that you wish to detect? What, specifically, are different about different versions of those browsers that you are concerned about and need to allow for? Where have you read that you need to detect for different versions of those web browsers?
Please give examples of what you have found in your research.
AFAIK, Internet Explorer is probably unique among the commonly used web browsers insofar as different versions cause unusual behaviours between them. Generally-speaking, other browsers are not as finicky in terms of handling HTML, CSS or Javascript between different releases of them. Also, and this may be relevant, because other web browsers are not "bundled" with an operating systems (like Internet Explorer and Edge are with Microsoft Windows) there's usually less reason to handle such cases differently because people are more likely to update those other web browsers; therefore, there's less to be concerned about.
In my [very humble] opinion, different versions of IE have a number of known knowns. I wouldn't be too concerned about unknown unknowns that affect FF, Chrome or Opera if you don't know what they might be. Remember also that this is the Joomla forum; it is not the repository of all information about various peculiarities with every web browser that's in use today. In conclusion, if you re attempting to handle different behaviours with various web browsers then such handlers should be located between the <header> and </header> tags.
Please give examples of what you have found in your research.
AFAIK, Internet Explorer is probably unique among the commonly used web browsers insofar as different versions cause unusual behaviours between them. Generally-speaking, other browsers are not as finicky in terms of handling HTML, CSS or Javascript between different releases of them. Also, and this may be relevant, because other web browsers are not "bundled" with an operating systems (like Internet Explorer and Edge are with Microsoft Windows) there's usually less reason to handle such cases differently because people are more likely to update those other web browsers; therefore, there's less to be concerned about.
In my [very humble] opinion, different versions of IE have a number of known knowns. I wouldn't be too concerned about unknown unknowns that affect FF, Chrome or Opera if you don't know what they might be. Remember also that this is the Joomla forum; it is not the repository of all information about various peculiarities with every web browser that's in use today. In conclusion, if you re attempting to handle different behaviours with various web browsers then such handlers should be located between the <header> and </header> tags.
- AMurray
- Joomla! Exemplar
- Posts: 9729
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Where to put IE version detect code
There are other, easier ways to alert to browsers that are too old....there's a number of plugins that do this such as such as https://extensions.joomla.org/extension ... e-warning/ - not only for IE but any of the mainstream browsers, will alert you the version is too old and prompt you to update it.
I assume this is what you're actually trying to do?
I assume this is what you're actually trying to do?
Regards - A Murray
General Support Moderator
General Support Moderator
- AMurray
- Joomla! Exemplar
- Posts: 9729
- Joined: Sat Feb 13, 2010 7:35 am
- Location: Australia
Re: Where to put IE version detect code
Others are also available - see this https://extensions.joomla.org/category/ ... standards/
Regards - A Murray
General Support Moderator
General Support Moderator
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Fri May 12, 2017 7:34 am
Re: Where to put IE version detect code
sozzled wrote:I don't understand your question. "Similar codes" can mean anything. What, specifically, is it about different versions of Firefox, Google Chrome or Opera that you wish to detect? What, specifically, are different about different versions of those browsers that you are concerned about and need to allow for? Where have you read that you need to detect for different versions of those web browsers?
Please give examples of what you have found in your research.
AFAIK, Internet Explorer is probably unique among the commonly used web browsers insofar as different versions cause unusual behaviours between them. Generally-speaking, other browsers are not as finicky in terms of handling HTML, CSS or Javascript between different releases of them. Also, and this may be relevant, because other web browsers are not "bundled" with an operating systems (like Internet Explorer and Edge are with Microsoft Windows) there's usually less reason to handle such cases differently because people are more likely to update those other web browsers; therefore, there's less to be concerned about.
In my [very humble] opinion, different versions of IE have a number of known knowns. I wouldn't be too concerned about unknown unknowns that affect FF, Chrome or Opera if you don't know what they might be. Remember also that this is the Joomla forum; it is not the repository of all information about various peculiarities with every web browser that's in use today. In conclusion, if you re attempting to handle different behaviours with various web browsers then such handlers should be located between the <header> and </header> tags.
Well I just simply thought that if there are major and/or important differences between the Internet Explorer versions (for example between IE8 and IE9; JavaScript and CSS issues) then I might want to filter out similar differences between the versions of the other mainstream browsers (that would affect my site) and after filtering out, alert the user to refresh his/her one.
But if there aren't any important differences (so in Safari (forgot to mention), Opera, Chrome, Firefox and other popular browsers) since long ago - or even if there are some, but won't beat my Joomla 3.8.2 site (with AdsManager extension) - then the question is irrelevant.
(But if there are any important differences that would affect the site, then I would like to alert the user for update. - Do you have suggestions related to this problem, if you are aware of anything? Of course I don't want you or anyone to describe all of these, but starting point(s) would be greeted. Or you say I shouldn’t bother with these (if I understand correctly)? )
(So the site: AdsManager extension, Joomla 3.8.2. The site uses JQuery.)
Also excuse me for not mentioning enough information related to my question or not being obvious.
Thank You!
-
- Joomla! Enthusiast
- Posts: 104
- Joined: Fri May 12, 2017 7:34 am
Re: Where to put IE version detect code
Yes it is. I want to filter out the browsers that won't work with my site (so Joomla 3.8.2, AdsManager, JQuery that is built in these, etc) and ask the user for browser update.AMurray wrote:There are other, easier ways to alert to browsers that are too old....there's a number of plugins that do this such as such as https://extensions.joomla.org/extension ... e-warning/ - not only for IE but any of the mainstream browsers, will alert you the version is too old and prompt you to update it.
I assume this is what you're actually trying to do?
I'm considering the usage of this extension though I think it would be better to check simply with these HTML directives (or whatever) since they need no update not even installation. But maybe I'm wrong.