Get javascript version from browser !=IE in asp.net - asp.net

In my current logging class I log the browser, browser version and javascript version.
The Javascript version I get through
HttpContext.Request.Browser.JScriptVersion
This works fine for IE, but not for any other browser.
Is there another way (not javascript based) to detect the installed javascript version?

There's no standard for transmitting javascript version over HTTP, so unless a browser coincidentally conforms to IE's User-Agent header format, you won't be able to get that info

Related

QT WebKit - Protocol "" is unknown

I'm using simple browser made with Qt WebKit.
On a page (running local rails server) I have a link that opens Pdf Previewer (pdf.js). In this .js script I try to open local (rails) url with path as parameter. Path can be local file path or some public url.
example:
http://localhost/documents/preview_file?path=http%3A%2F%2Fmy-domain.s3.amazonaws.com%2F4533902%2Ftest.pdf%3FAWSAccessKeyId%3DAKIAJWDKNPWPFJYREP6Q%26Expires%3D1480381051%26Signature%3DCqfAmGCm7S5lTpQ7pP0U25BqYpE%253D
In case parameter path is public url rails only redirects to this url.
But problem is, that in this browser I get an error (in console):
GET
http://localhost/documents/preview_file?path=http%3A%2F%2Fmy-domain.s3.amazonaws.com%2F4533902%2Ftest.pdf%3FAWSAccessKeyId%3DAKIAJWDKNPWPFJYREP6Q%26Expires%3D1480381051%26Signature%3DCqfAmGCm7S5lTpQ7pP0U25BqYpE%253D
Protocol "" is unknown
I get this error only in this QtWebKit browser, Chrome and Firefox open this link without problem.
Any help appreciated
10x
QtWebKit released with Qt is based on outdated WebKit engine, that does not implement all Web features available in modern browsers. So it is possible that your page is using some of JavaScript features that are not supported.
Please try your page with latest QtWebKit from https://github.com/annulen/webkit/releases/tag/qtwebkit-tp5. It is based on fresh WebKit and may work better with your content. See http://qtwebkit.blogspot.com/2016/08/qtwebkit-im-back.html for more details about what is happening with QtWebKit now.

GWT application not working in IE11

I have an application that is using GWT 2.0.4 and running fine on IE8 browser. When opened in IE11, it is giving blank page with error message given below.
com.google.gwt.core.client.JavaScriptException : (TypeError) : Object doesn’t support property or method ‘attachEvent’
The exception was thrown because “attachEvent” is a deprecated function used in older versions of Internet Explorer. IE11 uses “addEventListener” method instead of “attachEvent”.
The user.agent value was set to "ie6" so i changed it to "gecko1_8". After changing user agent it opens the application but the data in table(GWT-ext GridPanel) is getting overlapped over one another, scrollbars are missing and the alignment of menu bar is changed.
It is working fine after enabling the compatibility mode. What is the proper workaround to run my app in IE11 ? Do i need to upgrade GWT and if yes then to which version supports IE11? I don't have to use "X-UA-Compatible=IE8" meta tag....Please help
As with anything on the Web, you should always try to run the latest version, because everything changes around your application. 2.0.4 is 5 years old already!
So yes, upgrade to the latest version of GWT (2.7.0 as of today), and when the next version will come (2.8, in a few weeks) try to upgrade as well.
As a workaround, because it works in IE8, you could probably ask IE11 to emulate it using an X-UA-Compatible with value IE=EmulateIE8. But that's only a temporary workaround, as the next version (Edge, coming in Windows 10 to replace IE) will no longer support X-UA-Compatible (except in the Intranet zone). See the warning at the top of the X-UA-Compatible doc and this announcement by Mirosoft. The real solution is to stay up-to-date with GWT versions, just like you stay up-to-date with browser versions.

How to remove "SDL Tridion has not been tested with this version of the browser"

I'm seeing the following message in the Tridion CME and am unsure of where the configuration is to that removes it.
Can anybody help?
This means that you are using an unsupported browser, or unsupported version.
If you want to avoid receiving this message when using an unsupported version you can modify the file \web\webui\webroot\configuration\system.config
In this file you need to add your desired browser into the <supportedbrowsers> node
UPDATE:
As stated on the comments, your team need to be aware that they are working on an unsupported version, even if the popup does not remind it for you.
As a rule of thumb, if the GUI seems broken or buggy on any specific action, retest against a supported version.
TIP: To overcome the problem of updating the system.config with every new version. (It's hard to keep pace nowadays with new chrome of firefox versions!) you can use regular expressions:
<supportedbrowsers>
<browser name="Any Mozilla Firefox" regExp="Firefox/.*"/>
<browser name="Any Google Chrome" regExp="Chrome/.*"/>
...
</supportedbrowsers>
Easy "removal". Ensure you make note the the client that you've removed a note from a supported point of view. Annoying as a developer indeed. A reminder to an - unsupported - client when you leave is really important.
I believe you should not try to ignore the message. Try to find out the right supported browser based on version of your SDL Tridion and please note you make need to so some browser settings as well.

Xrefresh alternative

i am using Netbeans PHP + Firefox 4 on Windows for my web development.
I've used a common firebug extension called Xrefresh. It was automaticlly refreshing my opened firefox tab everytime change in my projects directory occured, so pressing ctrl+s in netbeans was triggering auto-refresh in the browser. Very comfort way to work with css, almost live preview.
But now since new Firefox and Firebug versions Xrefresh doesn't work anymore and the question is - are therey any good alternatives, or does someone know how to configure Xrefresh now?
Without live preview my development is somehow slower.
https://github.com/NV/auto_update_stylesheets
This could help you. It refreshes the page via ajax on css save.
There's an automatic refresh-on-change tool for IE. It's called ReloadIt, and is available at http://reloadit.codeplex.com . Free.
Not an add-on to IE, but more of an "adjunct". It does not change the IE install, does not install a BHO or anything like that. So very low-impact installation.
You choose a URL that you'd like to auto-reload, and specify one or more directory paths to monitor for changes. Press F12 to start monitoring.
After you set it, minimize it. Then edit your content files. When you save, the page gets reloaded. like this:
I've managed to keep using xrefresh up until Firefox 9 however I'm not having any luck with version 10.
I've now switched to livereload, they've had a decent Mac version out for a while and a very experimental Windows version has recently been released.

Google Chrome/Safari Same Browser Name and Version !

I have a asp.net website in which i check for supported browser.
That is i user
Request.Browser.Browser -- for the browser name
and
Request.Browser.MajorVersion for the browser version
Problem here is browser Safari and Google Chrome show me the same value !!!
That is AppleMAC-Safari(name) and version would be 5..
How do i differentiate between google chrome and safari then ???
Thanks ,
Francis P.
For each browser that Request.Browser.Browser can detect, there must be a *.browser file in C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers. Chrome and Safari are missing in version 2 of the .NET framework, but you can download an updated set of browser configurations from codeplex: http://aspnet.codeplex.com/releases/view/41420
There could possibly occur some compatibility issues (since these files are made for .NET 4). In such cases you may have a look at this blog post: http://stephenwalther.com/blog/archive/2010/03/05/use-asp.net-4-browser-definitions-with-asp.net-3.5.aspx

Resources