Browser-sync: IE8 broken since 2.0

Created on 25 Feb 2015  路  12Comments  路  Source: BrowserSync/browser-sync

Hi,

I've noticed that I can't preview sites in VirtualBox with ie8 since I updated to 2.0. I access the website with an ip address like this: http://192.168.1.42/my-site/

With version 1 of browser-sync the site load perfectly.

With version 2, the site load but all the ressources urls are still pointing to http://localhost/my-site/, causing many 404 and all styles, images and scripts are not loaded.

The ie8 developper tools doesn't show any errors so I'm not sure how I can help debug this further.

edit: The problem only occurs on IE8, with IE9 and all other browsers everything works.

bug regression

Most helpful comment

Is this back? IE8 on 2.15+ is throwing BS related errors.

Specifically:

var lookup=new Uint8Array(256)

'Uint8Array' is undefined

It's really strange. It throws it sometimes and sometimes it doesn't. Not sure what's going on...

I don't expect you to maintain IE8 forever, do you happen to know what the last IE8-friendly version was though?

All 12 comments

My site loads fine, but IE8 displays a script error:
"object doesn't support this property or method"
I'm using version 2.2.1.
Downgrading the version to 1.9.1 removes this error.

One thing that I don't understand is that if I look at the page source on ie8 the browsersync script which is inserted after the body is missing:

<script type='text/javascript' id="__bs_script__">//<![CDATA[
document.write("<script async src='/browser-sync/browser-sync-client.2.2.1.js'> <\/script>".replace("HOST", location.hostname));
//]]></script>

If I manually add this script to the html I get the same error as @HarveyBanham object doesn't support this property or method.

The IE debugger highlight this section of browser-sync-client.2.2.1.js:

if(obj.hasOwnProperty(key)&&_hasBinary(obj[key]))

Note that i load es5-shim and es5-sham on my project but removing them didn't change anything.

npm install browser-sync@latest --save-dev

:)

Hey there, Shane! I admit I'm a bit new to BrowserSync, but even after installing the latest via NPM today, the synced scrolling and injected updates don't seem to be working for me in IE8. The site displays just fine, just no syncing.

If it helps, I'm using both the proxy and the .xip.io options, and using Grunt as my task-runner (along with watch and jekyll). My IE8 is running in a VirtualBox host, and pointed at the external version of the BrowserSync URL, which has been working fine for my other browsers and devices (http://192.168.1.157.xip.io:3000).

Absolutely loving BrowserSync though, kudos to you for this amazing dev tool! Only been using it for a week, and already I feel like I can't do without it! Let me know if there's any other info I can provide to you for troubleshooting. Thanks!

@SherriAlexander - this _was_ fixed, but I can confirm it is once again a bug :(

Also in awe of BrowserSync, but keen to use it with IE8. Is a fix imminent, or is there a recommended past version to use to get the IE8 support?

@PaddyMann - thanks!

Erm, I'm yet to track down the bug that's preventing IE8 support, but it's high priority! Unfortunately, all I can say is "some time soon" :)

npm install [email protected]

:)

legend - thank you!

Happy to help :)

Is this back? IE8 on 2.15+ is throwing BS related errors.

Specifically:

var lookup=new Uint8Array(256)

'Uint8Array' is undefined

It's really strange. It throws it sometimes and sometimes it doesn't. Not sure what's going on...

I don't expect you to maintain IE8 forever, do you happen to know what the last IE8-friendly version was though?

Thought I'd add a workaround for any poor souls out there still working with IE8.

snippetOptions: {
    // Prevent injection of browser-sync-client.js in IE < 9.
    // Allows browsersync to serve pages to older versions of IE without
    // errors, but requires manual refreshing pages to view changes.
    rule: {
        match: /<\/body>/i,
        fn: function (snippet, match, x) {
            return `<!--[if gt IE 8]><!-- -->${snippet}${match}<![endif]-->`;
        }
    }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pensierinmusica picture pensierinmusica  路  4Comments

ngryman picture ngryman  路  3Comments

zewa666 picture zewa666  路  3Comments

Hurtak picture Hurtak  路  3Comments

demisx picture demisx  路  4Comments