How can I test if <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> does work? Especially if I let Apache handle it via htaccess.
Is there something in the IE developer tools?
Check it in IE8. If it is not set, Tools > Compatibility View will be usable. If it is set, the option will be grayed out and not usable.
check the "page default" of document mode, from IE developer tool bar.
Do you see the "broken" document icon between search and reload icons in the image? This is the Compatibility View button. If the edge value set using the meta tag or htaccess header worked, the Compatibility View button is not shown.
Image courtesy of Frank Code blog; you may also have a read at the post, if you want. It's worth it.
Related
I am trying to programmatically retrieve the contents of the chrome://gpu url.
As a start I tried to load up chrome://gpu from the command-line, but chromium refuses to start up with a url that is prefixed with a chrome: prefix.
Then I tried to out-clever that limitation by using a redirect page:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="7; url='chrome://gpu'" />
</head>
<body>
<p>Please follow this link.</p>
</body>
</html>
But that page, although it can be launched from command line, would not refresh for me.
Even clicking the link does not work, which leads me to determine that you cannot link to chrome://gpu at all.
When I tried right-click open-in-tab on the link, I get:
Which means that chromium is actively blocking access to it, unless it is typed out by the user.
I have two questions:
Can this block be disabled?
If not, how can I retrieve this information programmatically? Can I somehow feed artificial keystrokes into chromium?
Update 1
Tried to add virtual key-strokes with:
$ wtype test
Compositor does not support the virtual keyboard protocol
Update 2
I have gotten further: I can use ydotool to make chromium browse to chrome://gpu and then do Save-As, but that saves a nearly empty html page that references a gpu_internals.js script.
Is it possible to save the output of that script instead?
Access to the "chrome://gpu" URL is restricted and cannot be directly accessed programmatically. This restriction is in place to prevent malicious actors from manipulating the internal settings of the browser.
An alternative approach could be to use a headless browser like Puppeteer or Selenium to automate the process of retrieving the information from the "chrome://gpu" page.
I've found ydotool to be a good solution for this.
With it, you can automatically open a page to chrome://gpu and then click in the browser window, followed by Ctrl+A, Ctrl+C to retrieve to contents to the clipboard.
You can then use wl-paste from the wl-clipboard package to get it.
I am trying to use jsPDF.umd.js in SharePoint to create some pdfs in an enterprise environment.
Sadly I have to rely on IE11 in this environment.
I am loading the jsPDF with script tags
<script type="text/javascript" src="/sites/xxxx/polyfills.umd.js"></script>
<script type="text/javascript" src="/sites/xxxx/jsPDF.umd.js"></script>
and try to create an object with
new jspdf.jsPDF();
This works in Firefox and Edge, but Internet Explorer seems to not load the jsPDF.umd.js at all.
The error seems to be
SCRIPT1047: In strict mode, function declarations cannot be nested inside a statement or block. They may only appear at the top level or directly inside a function body.
File: jsPDF.umd.js, Line: 744, Column: 5
I am at a loss, because this works in ff and edge, but not in IE.
The sample (http://raw.githack.com/MrRio/jsPDF/master/#) site works with all browsers.
Is there a way to disable strict mode?
I never had problems with use strict before - though I do not know if and where it is activated.
I am not JavaScript developer - so maybe there is a completely different issue at work here.
edit:
the issue seems to be IE with javascript. I commented the lines with error from jspdf.umd.js out, and now I am getting a syntax error at line 847
let protection = 192;
maybe IE is using a pre ECMAscript 5 engine?
edit2:
navigator.userAgent
outputs
"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; Zoom 3.6.0)"
so I think I am in compatibility view - switching Document Mode seems to fix the issues - I don't know how to proceed from here yet, because this cannot be a general solution for all users.
edit3:
so the page contains
<meta http-equiv="X-UA-Compatible" content="IE=10">
so I will need to change that I guess.
Maybe these articles will help:
https://www.dannyjessee.com/blog/index.php/2020/03/rendering-a-single-sharepoint-page-in-ie-using-edge-mode/
https://paultavares.wordpress.com/2015/01/20/how-to-render-a-sharepoint-page-in-ie-using-edge-mode-without-changing-the-master-page/
From the description, I understand that JSPDF can work with the IE 11 or Edge document mode. But Sharepoint site contains the meta tag that loads the site in the IE 10 document mode. That breaks the JSPDF functionality.
To fix the issue, you need to load the site in the IE=edge mode.
You simply need to update your SharePoint's master page to target the latest version of IE, to update your master page, follow these simple steps.
Step 1: Download master page file.
Go to Site Settings.
Then to master pages and page layouts.
Look for the HTML version of your master page. If you are using Seattle as a master page for the site, look for the seattle.html file. If you're using the Oslo master page, then look for the oslo.html file.
Step 2: Update the master page code.
Open the downloaded file into a text editor of your choice, and look for the following meta-tag.
<meta http-equiv="X-UA-Compatible" content="IE=10" />
Update the value of the content attribute to have:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Now Save the file.
Note: The meta tag might be placed multiple times in your master page file, make sure to update them all.
Step 3: Upload master page file.
On the Master pages and page layouts click the ribbon bar, and click Upload Document button.
Now Choose the file you have just edited by clicking the Choose File button, then click OK to upload.
Another dialog will appear asking you to enter some information about the master page. Don't type anything, just click Check In button.
One last step you need to do is to make your changes available to all of your site visitors, which is to publish this master page.
To do that, Select your master page, and click the Publish button from the ribbon bar.
To proceed with publishing click OK on the next dialog.
Reference:
IE Compatibility with SharePoint and Office 365
One of our clients uses compatibility view for our site. Our website pages are old and cannot render in Standards mode. In IE10 compatibility view, if there is no doctype declaration, it forces it to IE5 Quirks mode.
Is there a way from html to force it to IE Default Quirks mode?
Yes. Use an x-ua-compatible header to emulate IE10's behavior.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10">
You can add this to each page's <HEAD> section or serve it using the web server.
(More of the underlying behavior change can be found here.)
Hope this helps...
-- Lance
I made changes in the master page of my SharePoint site. I have added a meta tag in my header like so:
<meta http-equiv="X-UA-Compatible" content="IE=8,9,10,11" />
and I've also changed the doctype, but the emulation is still rendering in IE9 document mode.
Attached is the screenshot.
Please let me know where I need to make changes. This site is using custom master page. I have updated it in the Custom as well as the V4 master page but no luck.
A few suggestions:
Set the content attribute of the <meta> tag to "IE=8" instead of "IE=8,9,10,11".
Make sure that the <meta> tag containing your IE rendering directive is the first <meta> tag in the header.
To prevent the F12 developer tools window from forcing the page into a particular document mode, close all instances of Internet Explorer, then start it up again and revisit the site without the F12 developer tools open. Open the F12 developer tools to check the page document mode only after the page has loaded.
I have tried this on numerous pc's and are receiving the same error. My webbrowser control isnt displaying javascript or jquery.
Here is a example:
when i visit this url in my browser: https://binarykings.co.uk/traderoom-aspx, it looks great with the charts and prices etc.
example: http://i.imgur.com/1Lmq4em.png
same in internet explorer: http://i.imgur.com/3KP864X.png
however in my vb.net webbrowser control it looks like this: http://i.imgur.com/qjme2Yg.jpg
What is causing this ? Its not just this site but any other site that has a similar way of displaying things via jquery/javascript.
I do have script errors suppressed however when i disabled this and clicked yes to the errors manually it still displayed the same empty page.
Thanks
The WebBrowser control uses the Internet Explorer rendering engine. But by default, for compatibility reasons, it is stuck using the IE 7 rendering engine, even if you have a later version of the browser installed on your computer.
There are a couple of ways to convince it to use a newer version of IE to render the page. One involves editing the registry, while the other involves modifying the web page.
In general, it is best to avoid attempts to solve local problems with global solutions like registry edits. There might be another app running on the same machine that uses the WebBrowser control and relies on the behavior of the IE 7 rendering engine. If you go changing global settings, you'll mess up that other app.
Therefore, the best solution, if possible, is to edit the web page. This is quite simple, and probably a good idea anyway. All you need to do is add the following code inside of the <head> section:
<meta http-equiv="X-UA-Compatible" content="IE=9" >
If you absolutely must use the alternative approach of editing the registry, you'll find the information you need here in the documentation.