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
Presently for CSS and JavaScript tags, path is generated like <script src='/assets/js/application.js'></script>. This path restrict browsers to fetch resources from root. Many a times during local development most developers don't create virtual-host and prefer to run web-apps under some directory in web-root which creates path like http://localhost/my_web_app. Inserting / before paths makes it difficult for those developers to use this library.
A clean way to achieve abstraction is to use CodeIgniter's built-in site_url method to generate path for assets. This will create correct path in every case.
The text was updated successfully, but these errors were encountered:
Presently for CSS and JavaScript tags, path is generated like
<script src='/assets/js/application.js'></script>
. This path restrict browsers to fetch resources from root. Many a times during local development most developers don't create virtual-host and prefer to run web-apps under some directory in web-root which creates path likehttp://localhost/my_web_app
. Inserting/
before paths makes it difficult for those developers to use this library.A clean way to achieve abstraction is to use CodeIgniter's built-in
site_url
method to generate path for assets. This will create correct path in every case.The text was updated successfully, but these errors were encountered: