Missing stylesheets/scripts/images when using BASE element for a local html file rendered in IE8 in IE8 standards mode

后端 未结 2 911
深忆病人
深忆病人 2021-01-05 22:04

We have some HTML pages (local, not on a web server) that use the BASE element to identify a specific base directory that contains a bunch of common stylesheets and images.

2条回答
  •  醉梦人生
    2021-01-05 22:35

    Unfortunately, it looks like IE8's standards mode does not handle file:// URI's in the BASE element.

    If you can run script inside your local pages, I'd suggest you use some simple javascript to loop through all your external elements (SCRIPT, IMG, LINK, IFRAME, FRAME) and fix up any scheme-less URIs (the ones that don't contain "://") using your desired BASE.

提交回复
热议问题