Menu

#203 Stylesheets independent from hostname

Unknown
open
None
Trunk
Feature
Unknow
Unknow
2020-12-10
2020-01-22
No

Hello,

I installed wikindxon a server in the intranet of my company. Accessing it from there works.
However, when I'm home and create a tunnel with local port forwarding to my machine,
I can still access wikindx but the stylesheets are not loaded. I suspect this is due to the hardcoded HOSTNAME. When I call it from remote, the address is of course different due to the tunnel (it's localhost:4444 then...

Best,

Thomas

Discussion

  • Mark Grimshaw

    Mark Grimshaw - 2020-01-22

    We'll look into it Thomas, Is this v6.0.1?

    Mark

     
    • Stéphane Aulery

      Hi Mark,

      Yes, if Thomas doesn't use 6.0.1.

      It's not a bug of wikindx, a limitation only. Adding a port change the url and break CSS/JS include and potentially other direct access to data files.

      A simple way to work around the problem is to inline the CSS / JS in the HTML pages when rendering the template, or to make all the includes relative (but the vhost must be correctly configured and the code not simply installed in a sub-folder).

      Regards,

       

      Last edit: Stéphane Aulery 2020-01-22
    • Stéphane Aulery

      Hello Thomas,

      Did you update to 6.0.1?

      When you do the mapping, do you cleanly proxy by rewriting urls and referers ?

      Regards,

       

      Last edit: Stéphane Aulery 2020-01-22
  • Stéphane Aulery

    Considered solution:

    Since style sheets are small, include the sheets by inlining instead of links. The loading time will also be reduced with fewer HTTP requests. So :

    • Inline CSS.
    • inline JS.
    • Embed icons (of size <= ???Ko) (optional).
    • Minify CSS (optional).
    • Minify JS (optional).
    • Cache minified files (optional).
     

Log in to post a comment.

Auth0 Logo