You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
This will try to fetch the images from the relative path you are on. If I've browsed to "mysite.com/user/profile", this will try to get the flag images from "mysite.com/user/profile/css/flags". This will not work on most frameworks, as they usually pass all requests through one script, that routes the request to the proper controller, thus all URLs are virtual, not actually reachable paths. Sure - rewriting all resource requests to the proper path is possible, but should not be necessary, as it's easily avoided.
A better solution would be, to have all the flags defined as classes, in a CSS file - this would resolve the relative path issue, as all included resources (background-image) in that CSS file, would be relative to the CSS file, not the URL.
An even better solution would be use a sprite for the flags. Requesting 353 small png files, one at a time, is not a good choice.
The text was updated successfully, but these errors were encountered:
vladimirbiro
added a commit
to vladimirbiro/country-picker
that referenced
this issue
Feb 24, 2020
This will try to fetch the images from the relative path you are on. If I've browsed to "mysite.com/user/profile", this will try to get the flag images from "mysite.com/user/profile/css/flags". This will not work on most frameworks, as they usually pass all requests through one script, that routes the request to the proper controller, thus all URLs are virtual, not actually reachable paths. Sure - rewriting all resource requests to the proper path is possible, but should not be necessary, as it's easily avoided.
A better solution would be, to have all the flags defined as classes, in a CSS file - this would resolve the relative path issue, as all included resources (background-image) in that CSS file, would be relative to the CSS file, not the URL.
An even better solution would be use a sprite for the flags. Requesting 353 small png files, one at a time, is not a good choice.
The text was updated successfully, but these errors were encountered: