Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relative Image Path not showing Image in FireFox

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

The Image Source is 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?

like image 995
Sandhurst Avatar asked Jan 21 '23 23:01

Sandhurst


1 Answers

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.

like image 192
Pascal Qyy Avatar answered Jan 23 '23 13:01

Pascal Qyy