- This topic is empty.
-
AuthorPosts
-
June 25, 2014 at 1:36 am #173631
David Hosanna
Participanthi guys, a hour ago i made an experiment with IE hacks. I called this curseIE to disable user to browse site in certain IE version. I was unable to test this because my IE already uninstalled a year ago and i don’t have credit card to pay premium cross-browser testing tool. I just want suggestions to improve my experiment, is this code reliable for this job?
var curseIEcontent = 'Please upgrade your browser'; var theme = 'default'; var check = 'IE9'; function curseIE() { if(check) { var layer = document.createElement("div"); layer.innerHTML = "<div>"+curseIEcontent+"</div>"; layer.className = "curseIEbox"; document.body.appendChild(layer); if (theme == "default") { var curseIEboxinner = document.getElementById("curseIEboxinner"); layer.setAttribute("style","position: fixed;top:0;left:0;right:0;bottom:0;background:#fff;z-index:9999999"); curseIEboxinner.setAttribute("style", "position:fixed;left:0;bottom:0;padding:15px;border:1px solid #ccc;border-bottom:0") } } } if (check = "IE10") { var doublecheck = /*@cc_on!@*/false; if (doublecheck) { curseIE(); } } if (check = "IE9") { var doublecheck = document.all && !window.atob; if (doublecheck) { curseIE(); } } if (check = "IE8") { var doublecheck = '\v'=='v'; if (doublecheck) { curseIE(); } } if (check = "IE7") { var doublecheck = document.all && !document.querySelector; if (doublecheck) { curseIE(); } } if (check = "IE6") { var doublecheck = document.all && !window.XMLHttpRequest; if (doublecheck) { curseIE(); } }
June 25, 2014 at 2:28 am #173634Paulie_D
MemberI called this curseIE to disable user to browse site in certain IE version
That’s just a bad idea.
Users often do not have a choice as to which browser they must use.
You should concentrate on progressive enhancement to ensure that users get the best experience their browser is capable of delivering, not stopping them seeing the page at all.
June 25, 2014 at 2:47 am #173635David Hosanna
ParticipantI personally very hate IE. In a nutshell, i use javascript hacks for a bad idea?
Otherwise, my site always looked bad on IE. Here’s why i create this script. I’m little bit selfish with IE.
Simple javascript alert should be better to tell IE users to upgrade their browser instead of stopping them to seeing the page.
June 25, 2014 at 3:01 am #173636Paulie_D
MemberSimple javascript alert should be better to tell IE users to upgrade their browser instead of stopping them to seeing the page.
Even that would be too ‘in your face’ for me.
If the user has no choice as to which browser to use they are stuck with it.
It doesn’t take a lot of work to make a site look ‘acceptable’ in older versions of IE.
I personally very hate IE.
Well that’s you…but now you’re imposing your opinions on other users and that just a poor user experience all round.
June 25, 2014 at 10:37 am #173674__
ParticipantI personally very hate IE.
That’s fine. Here’s the solution: don’t use it.
(That’s what I do!)
The fact that you don’t like something doesn’t mean that nobody else is allowed to.June 25, 2014 at 1:35 pm #173684Senff
ParticipantI just want suggestions to improve my experiment, is this code reliable for this job?
You can’t call something “hacks” and also “reliable” at the same time.
Otherwise, my site always looked bad on IE.
That’s not just IE’s fault, really.
June 25, 2014 at 1:37 pm #173685nixnerd
ParticipantHere’s my take: I hate IE too. Like really really hate it. If you discover something awesome that CSS can do like flexbox or preserve-3d, you can bet your ass IE won’t support it, just by virtue of it being “too progressive” or “too awesome.”
I would contend that the statistics on how many people actually use IE are way skewed because of bot traffic. I don’t think nearly the amount of people most devs think use IE. Not even close.
Be that as it may… SOME people do. It may be a very small contingency, but they still matter. Why? Well, not necessarily because they’re a unique snowflake just like everyone else and their feelings count to… no nothing like that. It’s that their money spends just like everyone else’s.
The vast majority of websites are in some way at least slightly commercial. That is, they are made to make money. So, you’re ignoring potential customers by not at least thinking about the IE folks.
Now, there may come a point of diminishing returns. If you look at your traffic and there’s hardly any IE traffic, and you know what your conversion rate is… then you can pretty easily figure out if its economically viable to support IE. Don’t support it just because we say you should. Really do your homework and figure out if you need to.
Now, I highly doubt that you have anything SO TECHNICAL that it will take weeks and weeks and weeks to adapt to IE. However, if this were the case, you could make a cogent financial argument for dropping IE support.
Also, no one EVER said your site has to look exactly the same on say IE8. It doesn’t have to have shims/shivs for every cool feature. It just has to be presentable.
June 25, 2014 at 5:52 pm #173701David Hosanna
Participant@Paulie_D
I think IE hacks used to make my site support IE. Sorry for the bad experiment.@un-traq-ed
I don’t use IE. Now, i worried if someone visit my site using IE.
@Senff
Yeah. Too stupid to call “reliable” and “hack” in the same time. I know hacks never reliable, they will be fixed soon.
@joe
Totally agreed with you. They don’t have shiny things like them. Chrome is exist why we have to choose IE. Based to outdatedbrowser.com, 23% people are using IE and firefox 19.7%. They are sick using IE.Also agreed if my site never looked same on ie8. This old guy too old.
Thanks guys, i know what i should do now.
June 25, 2014 at 6:17 pm #173702__
ParticipantI don’t use IE. Now, i worried if someone visit my site using IE.
Well, I figured you didn’t. What I was hinting at is that, if this is nothing more than you hating IE, then the “problem” can be solved by ignoring it.
If, however, there’s more to it than that —if you care about users (or their money, as Joe pointed out) that might visit your site in IE— then, really, you’re looking for a way to include those users, not a way to shut them out. That’s why Paulie_D called your roadblocks a “bad idea.”
Considering this, the part of Joe’s comment that should stand out is:
…I highly doubt that you have anything SO TECHNICAL that it will take weeks and weeks and weeks to adapt to IE.
June 25, 2014 at 10:18 pm #173709nixnerd
ParticipantAlso, let’s keep in mind that the polyfill tools available are freaking bad ass. Moderizr.js is one of the most useful things ever. It doesn’t exactly solve your problems, but it allows you to use alternate methods where support for a given feature isn’t there. I’ve used it on many occasions. It couldn’t be more simple.
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.