avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday July 22, 2024, 3:05 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: FARR HTML view mode questions (browser engine/mode, CSS)  (Read 3529 times)


  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
FARR HTML view mode questions (browser engine/mode, CSS)
« on: October 23, 2020, 12:54 PM »
Background: I'm using FARR to show HTML files generated by Pandoc from Markdown source files with CSS similar to that of GitHub.

I ran into some CSS issues which got me searching for details on the browser engine/mode used by FARR. The forum posts I find on that are quite old and I'm not sure if they reflect the current state of FARR. Thus questions:

1. What browser engine/mode (not sure what the correct term is here) does FARR by default use on a fresh install of Windows 10 with latest updates? Edit: answered in edits below.
2. Are some FARR settings available to adjust what browser is used or some details on how it is used?

The help page https://www.donation...p/html_view_mode.htm says
Html view mode is currently rendered using the IE activex dll as an embedded web browser.  This means that it will use the version of the Internet Explorer engine installed on the user's pc, and can support displaying anything that can be displayed in a normal browser.
It is not so clear if that means IE11.

One of my CSS issues was that FARR did not show the background color of inline code blocks in the HTML I tested with.

How it looks in Firefox/Chrome/Edge
firefox chrome edge.png

How it looks in FARR

I tracked this down to the CSS using the color function RGBA which IE seems to not support
edit: My mistake. The correct RBGA() compatibility page says IE9+ is supported, IE6-8 is not.

Adding this line to the HTML
<meta http-equiv="x-ua-compatible" content="IE=edge" />
makes FARR show the code element background color just like in the external browsers.
I found that on , with much more background on .

So, workaround achieved, I suppose. But I'm unsure what other changes in how FARR renders HTML that line causes. Does it make FARR use Edge? Or adjust the IE1 version/mode used? I hope for feedback from mouser or others on this topic.

edit: Answering myself. We can check browser document mode by adding this line to the HTML document, which shows a popup when FARR renders it
Findings: Before adding the "<meta ..." line my FARR used document mode IE7. After adding the line FARR uses IE11.

That explains why the CSS RGBA() function, which required IE9+, only worked after adding the line. Note also that the "IE=edge" part does not mean that the browser Edge is used, it instead means that the newest available Internet Explorer document mode will be used. Which is IE11 on a fully updated Windows 10 PC today.

To reproduce my exact steps do this:

- download from the tldr project GitHub.
- download this style.css that mimics GitHub's looks.
- download Pandoc
- run this to output the file cmd.html
pandoc -c style.css -s --self-contained -o cmd.html

- edit cmd.html and remove these lines (otherwise FARR will freeze and not show the HTML)
  <!--[if lt IE 9]>
    <script src="//"></script>

- create a FARR alias with this as result
showfilehtml C:\path\to\cmd.html

- trigger the alias and notice that the code elements lack background color
- edit cmd.html again and add this below the <head> line
<meta http-equiv="x-ua-compatible" content="IE=edge" />
- trigger the alias again - now the background color should show.

BTW I'm reworking some of my FARR stuff which explains my many recent FARR posts. Bear with me mouser :)

« Last Edit: October 24, 2020, 04:00 AM by Nod5 »