HTML <base> TAG and local folder path with Internet Explorer

前端 未结 9 1648
天命终不由人
天命终不由人 2020-11-28 10:55

I am trying to use < base> TAG to indicate the source folder containing the media files for my html pages located in separate folder.

I have the

相关标签:
9条回答
  • 2020-11-28 11:26

    Use an absolute URL:

    <base href="http://yourdomain.com/MEDIA_FOLDER"/>
    
    0 讨论(0)
  • 2020-11-28 11:35

    This is a known issue and it's that IE requires closing the tag but not Firefox, the other browsers simply don't care. Here is what works for me:

    <base href="{BASE_PATH}"><!--[if IE]></base><![endif]-->
    

    Feel free to tweak at your will, and of course replace {BASE_PATH} with your actual path, i normally use an absolute path, but i've seen this work for relative too

    EDIT: And please note that your path should end with a trailing slash

    0 讨论(0)
  • 2020-11-28 11:38

    It looks like there are two separate issues with IE8 and IE9.

    http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/c51bb8b9-40ab-437b-a125-88b660f3e1ca/

    http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/e5cfdf07-494c-4703-aa4a-34a1a548de05/

    A workaround that seems to be working in IE8 and IE9 is including http:// in the base href. I am not experiencing any issues in Firefox (v9)

    0 讨论(0)
提交回复
热议问题