开发者

Relative Image Path not showing Image in FireFox

开发者 https://www.devze.com 2023-01-28 18:36 出处:网络
I am trying to open a html page using Iframe. The Html page has some text and Images. The Image Source i开发者_开发知识库s specified using releative path for e.g. ....\\Images\\Img1.jpeg.

I am trying to open a html page using Iframe. The Html page has some text and Images.

The Image Source i开发者_开发知识库s specified using releative path for e.g. ....\Images\Img1.jpeg.

Its working fine in IE and Chrome. In firefox the Image Path is becoming like-

http://localhost:1657/WebSite/Stories/kunwar/..%5C..%5CImages%5CStory_images%5Cimg1.jpeg

What am I missing here?


Backslash (\) are the Windows separators, but in url and uri, you need use slash (/), even if your server use a Windows OS.

See RFC 3986 "Uniform Resource Identifier (URI): Generic Syntax", section 1.2.3 "Hierarchical Identifiers"

The generic syntax uses the slash ("/"), question mark ("?"), and number sign ("#") characters to delimit components that are significant to the generic parser's hierarchical interpretation of an identifier.


Try using forward slashes instead of backslashes.

0

精彩评论

暂无评论...
验证码 换一张
取 消