Problem With IE 8 - internet-explorer-8

My site is working fine on mozila but when we go for IE 8 it gives error on status bar
Webpage error details:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Timestamp: Sun, 3 Apr 2011 16:26:29 UTC
Message: Object expected
Line: 8
Char: 3
Code: 0
on line 7 to 11
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#container').easyTabs({defaultContent:1});
});
</script>

Is this web page publicly accessible? I work for a company called Changebase who have a product called “AOK Browse-It” which can check for IE8 compatibility. If you can send me the URL I can run it through this tool and post the results here. The tool can ‘spider’ static websites automatically, or for more complex web sites (user logon, dynamic content etc) we use ‘client-side capture’ which monitors web browsing using an agent on the PC.

Related

Visual Studio 2015 IIS Express not loading assets such as CSS, JS, Images

I have a project, I build it in VS2015 and hit ctrl+F5 to start without debugging and launch the site in browser.
However non of my css, js, images are loading in chrome and edge?
In browser console I see:
GET http://localhost:2195/Content/app.css net::ERR_ABORTED 404 (Not Found)
In my layout file have the above defined as follows:
<link href="#Url.Content("~/Content/app.css")" rel="stylesheet" type="text/css" />
Below is what I have in the properties box of the development server:
Development Server
Always start when debugging: True
Anonymous Authentication: Disabled
Managed Pipline Mode: Integrated
SSL Enabaked: False
URL: http://loaclahost:2195/
Windows Authetication: Enabled
Any ideas as issue is only in browsers where i'm asked to enter my windows credentials?
When I enter the http://localhost:2195/Content/app.css directly in browser i get 404 error:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:2195/content/app.css
Logon Method Negotiate
Why is the logon method showing as negotiate even though I've setup authentication to windows both in web.config and in the dev server?
* Update *
Installed jexus manager and added connection to site. Under actions > manage website, when i click start I get the following error see attached pic.
When I click on browse website I get dialogue saying this website is not running do you want to start it now. When I click yes I get the same error above and when I clikc ok on the error above I'm redirected to the site in browser and I'm able to navigate the site on localhost.
This is the report generated not much info that i haven't already provided before:
Scan the folder U:\Visual Studio 2015\Projects\MyProject\MyProject for project files.
1 project(s) are detected.
* MyProject.csproj
Project file: U:\Visual Studio 2015\Projects\MyProject\MyProject\MyProject.csproj.
IIS Express configuration file: U:\Visual Studio 2015\Projects\MyProject\.vs\config\applicationHost.config.
Analyze ASP.NET project.
Extract web project settings.
UseIIS: True
AutoAssignPort: True
DevelopmentServerPort: 2195
DevelopmentServerVPath: /
IISUrl: http://localhost:2195/
NTLMAuthentication: False
UseCustomServer: False
CustomServerUrl:
SaveServerSettingsInUserFile: False
UseIISExpress: true
IISExpressSSLPort:
IISExpressAnonymousAuthentication: disabled
IISExpressWindowsAuthentication: enabled
IISExpressUseClassicPipelineMode: false
UseGlobalApplicationHostFile:
Scan all bindings.
IIS Express is used for this project.
Binding localhost on *:2195 (http).
A matching binding is found for http://localhost:2195/.

Chrome delay loading cached SVG file

I have javascript code that requests an SVG resource file for displaying.
The SVG won't change. It is about 100kb, containing one embedded jpeg image (as a data:image/jpeg:base64). So I'd like the browser to cache it if possible.
The code to load the svg is something like this
$(btn).click(function(){
console.log("loading...");
$(element).load("mri/t1/axi/t1_axi_100.svg", function(resp, status, xhr){
console.log("loaded");
...
});
});
It seems this takes 2 seconds. All of this time delay is in between the "loading..." and "loaded". You can see from the profiling (chrome dev tools timeline), that there's no processing going on in between: the left call stack is for the "click" event, and the right one is for the "loaded" handler. In between is a gap where "mri/t1/axi/t1_axi_100.svg" is allegedly loading (long blue bar near top).
However when I look in Network under chrome dev tools, I see that each of the "download" steps took < 4 ms only. (narrow blue bars on right hand side; note the large gaps)
You can also see here that the caching has worked (svgs from disk cache; embedded jpegs from memory cache).
The breakdown of the 4ms for the svg is shown here.
So why is there a 2 second delay? My code takes 4 ms, and the retrieval from the cache seems to take 4 ms!
The headers shown in the "Network" tab are:
General
Request URL:http://homphysiology.org/neurosim/basic/slices/mri/t1/axi/t1_axi_100.svg
Request Method:GET
Status Code:200 OK (from disk cache)
Remote Address:173.254.28.84:80
Response Headers
Accept-Ranges:bytes
Cache-Control:max-age=2592000
Content-Encoding:gzip
Content-Type:image/svg+xml
Date:Tue, 17 Jan 2017 15:49:02 GMT
Expires:Thu, 16 Feb 2017 15:49:02 GMT
Last-Modified:Thu, 11 Aug 2016 18:26:42 GMT
Server:nginx/1.10.2
Vary:Accept-Encoding
X-Content-Type-Options:nosniff
Request Headers
Provisional headers are shown
Accept:text/html, */*; q=0.01
Referer:http://homphysiology.org/neurosim/basic/case2_nonlinear.html
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
X-Requested-With:XMLHttpRequest
Could Chrome be polling the server and waiting for a response?
If so can I prevent this? Alternatively could it be that the XHR ready state is not being triggered in a timely fashion?
It looks like server delay to me.
You show us two different resource downloads at Timeline and Network tabs. First one is t1_axi_100.svg and second one is t1_axi_070.svg. Probably browser took only t1_axi_070.svg from cache. TTFB for t1_axi_100.svg was 1.75 seconds in my case.

Show warning on page only when IE7

I want to show a warning on a particular page I have if and only if the user is using IE 7.
I am currently seeing an issue where if the user is using IE 8 in compatibility mode they are seeing this warning message, the logic is as follows:
Please note: Some customers using Internet Explorer 7 web browser may not be able to use parts of this site. You may wish to upgrade.
How can I fix the page so that the customer is only shown this warning if they are really using IE7?
The specifics depends on the web framework in use (asp.net etc), but you can check the browser version by checking the user agent submitted by the browser. Each browser will have a unique user agent that includes the version number as well. The user agent will be in the http request.
Here's a link with a few options if you're using asp.net
http://msdn.microsoft.com/en-us/library/ms537509(v=vs.85).aspx
<script type="text/javascript">
var $buoop = {vs:{i:7,f:5,o:12,s:5,n:9}};
$buoop.ol = window.onload;
window.onload=function(){
try {if ($buoop.ol) $buoop.ol();}catch (e) {}
var e = document.createElement("script");
e.setAttribute("type", "text/javascript");
e.setAttribute("src", "//browser-update.org/update.js");
document.body.appendChild(e);
}
</script>

Webdav.Net Ajax File Browser: cannot connect to the webdav server in FireFox 20.0.1

I am using the code below to display the ajax file browser control in a .Net Web app project that I run locally using the development web server on an auto assigned port.
The webdav server runs locally on IIS 7 (port 80), it is a .net app using the webdav.net server library. The security in the app is set Windows Authentication. I also allow anonymous users to the OPTIONS request.
The page works fine in IE & Chrome, however FireFox doesn't connect, it returns the message: Location ".../WebDav/" not found.
I enabled Firebug and the problem is that the Webdav server returns a 401 Unauthorized to the OPTIONS request.
Is there anything that can be done to make it work in FireFox as well?
<%# Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE HTML>
<html>
<head>
<title>IT Hit AJAX File Browser</title>
<!-- Always set width and height for html and body if you would like to set width and height for Ajax File Browser control to 100% -->
<style type="text/css">
#import "AjaxFileBrowser/themes/ih_vista/include.css";
html, body {margin: 0px; padding: 0px; width: 100%; height: 100%;}
</style>
<script src="AjaxFileBrowser/ITHitAJAXFileBrowser.js" type="text/javascript"></script>
<script type="text/javascript">
function InitAjaxFileBrowser() {
// Here we assume that your server is located on site root (http://server/) on the domain from which this page is loaded.
// If your WebDAV server is located on a different domain or on a different port the server must attach the Access-Control-Allow headers to server responses.
var port = window.location.port == '' ? '' : ':' + window.location.port;
var webDavServerPath = window.location.protocol + '//' + window.location.hostname + port;
webDavServerPath = "http://localhost/WebDav";
// Create the AJAX File Browser Settings object.
var settings = {
Id: 'AjaxFileBrowserContainer', // (required) ID of the HTML control in which Ajax File Browser will be created
Url: webDavServerPath, // (required) the root folder to be displyed in Ajax File browser
Style: 'height: 100%; width: 100%', // (required) always provide size of the control
FileIconsPath: '/TestWebDavAjaxFileBrowser/AjaxFileBrowser/icons/', // (required) path to the folder where file icons are located
MsOfficeTemplatesPath: webDavServerPath + '/', // path to MS Office templates, always specify full path
SelectedFolder: webDavServerPath, // folder to be selected, same as SetSelectedFolder call
PluginsPath: '/TestWebDavAjaxFileBrowser/AjaxFileBrowser/plugins/' // path to Java applet that opens documents directly from server
};
//Create control.
var ajaxFileBrowser = new ITHit.WebDAV.Client.AjaxFileBrowser.Controller(settings);
}
</script>
</head>
<body class="ih_vista" onload="InitAjaxFileBrowser();">
<div id="AjaxFileBrowserContainer" style="width: 100%; height: 100%"></div>
</body>
</html>
thanks
Update 1:
I tried the solution outlined for Safari here: http://www.webdavsystem.com/ajaxfilebrowser/programming/authentication_ssl, however it doesn't work (neither Safari nor FireFox). I am prompted for password but the options request is still Unauthorized.
I also enabled NTLM Authentication in the .Net project properties - Web tab. Still doesn't work the OPTIONS request comes back as unauthorized.
Update 2:
I got it working in FireFox when I run the client .Net app in IIS rather than the development web server (the .Net client web app and the webdav server run locally in IIS on port 80). When I run it in IIS, FireFox works but not Safari. Safari keeps prompting me for password. I am still curious to see if there is a solution when running the client app in the local development web server.
Try using this in web.config:
<authorization>
<!--
To support Windows Shell (Miniredirector/Web Folders) on XP and Server 2003 as well as Firefox CORS requests, OPTIONS must be
processed without authentication. To enable authentication of OPTIONS request, remove "allow OPTIONS" from the list below.
-->
<allow users="*" verbs="OPTIONS"/>
<deny users="?"/>
<allow users="*"/>
</authorization>

Internet Explorer 7 + MVC 3 = bad urls?

This is weird. I say weird because on IE 8 and above (as well as FF) my urls generated by Html.ActionLink() creates an url in the correct form -> http://mydomain.com/myapp/mycontroller/myaction but on IE 7 and IE8 running in compatibility mode the urls are generated as -> http:///myapp/mycontroller/myaction . This is also affecting anything that uses Url.Content().
This is a concern because I have users still holding on to IE 7 for dear life (I don't get it either). Plus our Active Directory policy has things set for some (not all) users so that IE 8 is forced into compatibility mode and cannot be turned off. It also overrides the compatibility meta tag.
What should I check for here within MVC? Is there a web.config setting I need to look at?
Code:
Action links:
#Html.ActionLink("My Text", "Action", "Controller", new { Param1 = Model.Param1 }, new { #class = "linkButton" })
Url.Content:
Url.Content("~/Content/openHS.png")
Update:
I found a similar item dealing with this issue in PHP: Why can't I use relative URLs with IE7?
A couple of other articles around the web mentioned using the <base> header tag.. trying this now. used the search "relative urls" "Internet explorer 7"
This works. I tested in WinXP mode with IE 8 in compatibility mode as well as in Internet Explorer 8 IE 7 mode, IE 9, IE9 Compat, FF 11. No harm to my existing JavaScript
For Razor:
#{
string baseHref;
if(this.Request.Browser.Type == "IE7" && !this.Request.UserAgent.Contains("Trident/5.0"))
{
baseHref = this.Request.Url.Scheme + "://" + this.Request.Url.Authority + Url.Content("~");
}
else
{
baseHref = Url.Content("~");
}
}
Then in the top of the <head>:
<meta http-equiv="X-UA-Compatible" content="IE=9;IE=8;" />
<meta charset="utf-8" />
<base href="#(baseHref)"/>
One explanation on the above: Trident/5.0 is IE 9's compatibility engine and seems to allow IE9 to interpret relative links according to the page domain instead of base. I'm sure you can remove the Razor code if you so choose. This was a compatibility patch for me.

Resources