Why does a self-referencing iframe not infinitely loop and crash my machine?

W3C took care of that in 1997 explaining how frames should be implemented in “Implementing HTML Frames”: Any frame that attempts to assign as its SRC a URL used by any of its ancestors is treated as if it has no SRC URL at all (basically a blank frame). Iframe recursion bug/attack history As kingdago … Read more

Button inside of anchor link works in Firefox but not in Internet Explorer?

You can’t have a <button> inside an <a> element. As W3’s content model description for the <a> element states: “there must be no interactive content descendant.” (a <button> is considered interactive content) To get the effect you’re looking for, you can ditch the <a> tags and add a simple event handler to each button which … Read more

Forcing Internet Explorer 9 to use standards document mode

<!doctype html> <meta http-equiv=”X-UA-Compatible” content=”IE=Edge”> This makes each version of IE use its standard mode, so IE 9 will use IE 9 standards mode. (If instead you wanted newer versions of IE to also specifically use IE 9 standards mode, you would replace Edge by 9. But it is difficult to see why you would … Read more

Difference between “Browser Mode” and “Document Mode” in Internet Explorer

Document Mode is what the browser uses to render the page: IE9, IE8, IE7 or Quirks. Browser Mode sets how the browser identifies itself to the web server and to JavaScript. From a testing standpoint, it seems unnecessarily confusing that these are two separate options and you usually want to change both, for example, set … Read more

includes() not working in all browsers

If you look at the documentation of includes(), most of the browsers don’t support this property. You can use widely supported indexOf() after converting the property to string using toString(): if ($(“.right-tree”).css(“background-image”).indexOf(“stage1”) > -1) { // ^^^^^^^^^^^^^^^^^^^^^^ You can also use the polyfill from MDN. if (!String.prototype.includes) { String.prototype.includes = function() { ‘use strict’; return … Read more

Angular4 Application running issues in IE11

To add more detail to @Zeqing’s answer. I uncommented the following line of codes in .\my-app\src\polyfills.ts : /** IE9, IE10 and IE11 requires all of the following polyfills. **/ import ‘core-js/es6/symbol’; import ‘core-js/es6/object’; import ‘core-js/es6/function’; import ‘core-js/es6/parse-int’; import ‘core-js/es6/parse-float’; import ‘core-js/es6/number’; import ‘core-js/es6/math’; import ‘core-js/es6/string’; import ‘core-js/es6/date’; import ‘core-js/es6/array’; import ‘core-js/es6/regexp’; import ‘core-js/es6/map’; import ‘core-js/es6/set’;

Save base64 string as PDF at client side with JavaScript

you can use this function to download file from base64. function downloadPDF(pdf) { const linkSource = `data:application/pdf;base64,${pdf}`; const downloadLink = document.createElement(“a”); const fileName = “abc.pdf”; downloadLink.href = linkSource; downloadLink.download = fileName; downloadLink.click();} This code will made an anchor tag with href and download file. if you want to use button then you can call click … Read more

Dynamically loading css stylesheet doesn’t work on IE

Once IE has processed all the styles loaded with the page, the only reliable way to add another stylesheet is with document.createStyleSheet(url) See the MSDN article on createStyleSheet for a few more details. url=”style.css”; if (document.createStyleSheet) { document.createStyleSheet(url); } else { $(‘<link rel=”stylesheet” type=”text/css” href=”‘ + url + ‘” />’).appendTo(‘head’); }

Open links made by createObjectURL in IE11

This demo uses Blob URL which is not supported by IE due to security restrictions. IE has its own API for creating and downloading files, which is called msSaveOrOpenBlob. Here is my cross-browser solution that works on IE, Chrome and Firefox: function createDownloadLink(anchorSelector, str, fileName){ if(window.navigator.msSaveOrOpenBlob) { var fileData = [str]; blobObject = new Blob(fileData); … Read more

CSS rotate property in IE

To rotate by 45 degrees in IE, you need the following code in your stylesheet: filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod=’auto expand’, M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476); /* IE6,IE7 */ -ms-filter: “progid:DXImageTransform.Microsoft.Matrix(SizingMethod=’auto expand’, M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)”; /* IE8 */ You’ll note from the above that IE8 has different syntax to IE6/7. You need to supply both lines of code … Read more

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