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
It's not the same file path as CONTENT and BODY tabs.
It's because we use relative path for HTML, but JS and CSS are'nt located at the same place.
And it's not "sub-folder agnostic". As it's quite uncomfortable to use relative path (../../media/burger.jpg), I think, most user would use absolute path. Which prevent W from being moved in a sub-folder easily.
serve js and css files from the same path as the HTML
option 1
Using the same relative syntax as HTML:
./media/burger.jpg
And convert it to absolute path
/media/burger.jpg
Or, if W is in a subfodler
/sub-folder/media/burger.jpg
The main problem I see is that it will be very confusing when comparing the code with Web browser inspector. As many user use it to edit page's CSS and JS
option 2
This is more transparent. But this mean writing a solid file serving interface in PHP, which will have to go through Alto router. It would be important to implement HTTP caching for example.
Maybe there is a smartest way to do it using Apache rewrite engine.
The text was updated successfully, but these errors were encountered:
It's not the same file path as CONTENT and BODY tabs.
It's because we use relative path for HTML, but JS and CSS are'nt located at the same place.
And it's not "sub-folder agnostic". As it's quite uncomfortable to use relative path (
../../media/burger.jpg
), I think, most user would use absolute path. Which prevent W from being moved in a sub-folder easily.Page path
When W is inside subfodler
JS and CSS path
To solve this, I see two main options:
option 1
Using the same relative syntax as HTML:
And convert it to absolute path
Or, if W is in a subfodler
The main problem I see is that it will be very confusing when comparing the code with Web browser inspector. As many user use it to edit page's CSS and JS
option 2
This is more transparent. But this mean writing a solid file serving interface in PHP, which will have to go through Alto router. It would be important to implement HTTP caching for example.
Maybe there is a smartest way to do it using Apache rewrite engine.
The text was updated successfully, but these errors were encountered: