Why doesn’t indexOf work on an array IE8?

Versions of IE before IE9 don’t have an .indexOf() function for Array, to define the exact spec version, run this before trying to use it: if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt /*, from*/) { var len = this.length >>> 0; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); … Read more

Running Internet Explorer 6, Internet Explorer 7, and Internet Explorer 8 on the same machine

I wouldn’t do it. Use virtual PCs instead. It might take a little setup, but you’ll thank yourself in the long run. In my experience, you can’t really get them cleanly installed side by side and unless they are standalone installs you can’t really verify that it is 100% true-to-browser rendering. Update: Looks like one … Read more

‘console’ is undefined error for Internet Explorer

Try if (!window.console) console = … An undefined variable cannot be referred directly. However, all global variables are attributes of the same name of the global context (window in case of browsers), and accessing an undefined attribute is fine. Or use if (typeof console === ‘undefined’) console = … if you want to avoid the … Read more

Force IE compatibility mode off using tags

There is the “edge” mode. <html> <head> <meta http-equiv=”X-UA-Compatible” content=”IE=edge” /> <title>My Web Page</title> </head> <body> <p>Content goes here.</p> </body> </html> From the linked MSDN page: Edge mode tells Windows Internet Explorer to display content in the highest mode available, which actually breaks the “lock-in” paradigm. With Internet Explorer 8, this is equivalent to IE8 … Read more

Cookie blocked/not saved in IFRAME in Internet Explorer

I got it to work, but the solution is a bit complex, so bear with me. What’s happening As it is, Internet Explorer gives lower level of trust to IFRAME pages (IE calls this “third-party” content). If the page inside the IFRAME doesn’t have a Privacy Policy, its cookies are blocked (which is indicated by … Read more

Tools to selectively Copy HTML+CSS+JS From A Specific Element of DOM [closed]

SnappySnippet I finally found some time to create this tool. You can install SnappySnippet from Github. It allows easy HTML+CSS extraction from the specified (last inspected) DOM node. Additionally, you can send your code straight to CodePen or JSFiddle. Enjoy! Other features cleans up HTML (removing unnecessary attributes, fixing indentation) optimizes CSS to make it … Read more

Stop Visual Studio from launching a new browser window when starting debug?

Open your startup project’s properties (Project → {ProjectName} Properties… from the main menu or right click your project in the Solution Explorer and choose Properties), then navigate to the Web tab and under Start Action choose Don’t open a page. Wait for a request from an external application. You will still be able to use … Read more

Is there a tag to turn off caching in all browsers? [duplicate]

For modern web browsers (After IE9) See the Duplicate listed at the top of the page for correct information! See answer here: How to control web page caching, across all browsers? For IE9 and before Do not blindly copy paste this! The list is just examples of different techniques, it’s not for direct insertion. If … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)