Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    BUG - WebGui and not compress js files and other resources

    Scheduled Pinned Locked Moved webGUI
    15 Posts 5 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      albgen
      last edited by

      Hi,

      i have noticed that using the webgui, only the CSS files are compressed. Resources like JS files, fonts and others are not compressed.
      Tried to enable it in nginx web server but did not worked. Enabling compression will make the UI a lot faster.

      Any idea?

      Thanks

      1 Reply Last reply Reply Quote 0
      • A
        albgen
        last edited by

        sorted it out why it was not working the config of nginx. Basically the article explaines which is the config used for nginx https://awesomediocrity.wordpress.com/2017/06/05/confine-webinterface-to-ssh-only-on-pfsense-2-4/

        After the changes i did, now the web gui it's running a lot faster compressing everything! :)

        hope one day to have a checkbox on the setup or somehwere where i can decide whenever to enable it or not…

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          "now the web gui it's running a lot faster compressing everything!"

          So its faster – how much so, and are you accessing the gui remotely over a high latency line or something?  Gui would normally be local, I don't see how compression would speed it up any and if so it would be ms...  If anything now webserver has to work harder to compress it, etc.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • A
            albgen
            last edited by

            Yes accesing remotly, wan is 2mbit symmetric line.
            Before compression 17seconds to load the main page. With compression 6 seconds.
            Cpu utilisation  less than 1% with gzip set at 6 as compression level

            ;)

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by

              What widgets do you have?

              Or are you talking just the login page?

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • A
                albgen
                last edited by

                After the login page. The main one. No widget enabled. Standard config of pfSense…

                Even the login page is faster and all other pages are more faster...

                1 Reply Last reply Reply Quote 0
                • S
                  Steve_B Netgate
                  last edited by

                  Browser not caching?

                  Als ik kan

                  1 Reply Last reply Reply Quote 0
                  • A
                    albgen
                    last edited by

                    I don't think it's caching…both chrome and IE have the same behaviour.

                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator
                      last edited by

                      What specific change did you make in the conf?  While I normally access the pfsense gui locally and its pretty freaking quick - be hard to tell if any speed up unless it was very drastic which I find hard to believe.. The current delays in the page "finishing" is all in the widgets, and the check to see if new version, etc.

                      But I do also access via vpn that has to take the long way around ;)  Chicago to proxy in hou,tx or jax,fl back to chicago - so latency is high.. So I would be curious if your compression makes a difference that is of notice when doing that..

                      An intelligent man is sometimes forced to be drunk to spend time with his fools
                      If you get confused: Listen to the Music Play
                      Please don't Chat/PM me for help, unless mod related
                      SG-4860 24.11 | Lab VMs 2.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan
                        last edited by

                        Added to this, what does this :

                        ….nginx https://awesomediocrity.wordpress.com/2017/06/05/confine-webinterface-to-ssh-only-on-pfsense-2-4/ ...

                        it just explains, using 2.4 pfSense beta code, how to tunnel the the GUI access through a SSH tunnel. Tunneling will NOT accelerate things.

                        Checking out the 2.3.4 GUI nginx config, you will find out that CSS, javascript and other files are gzipped …

                        And what the heck is opnfense ? Another patch ?

                        Anyway. The GUI is a tool to set it up. When done, 99,99999 % of the firewall's live time you won't access it anymore.
                        I tend to say that the GUI is fast, very fast already.

                        No "help me" PM's please. Use the forum, the community will thank you.
                        Edit : and where are the logs ??

                        1 Reply Last reply Reply Quote 0
                        • C
                          chrcoluk
                          last edited by

                          compressing wont have that kind of benefit, whilst 2mbit is not fast its not dialup either.  HTTP compression was invented in the dialup era when it did actually make a difference.

                          Things like the javascript code sent to your browser is a small amount of data, which a 2mbit line will handle without a sweat unless maybe that line itself is extremely saturated somewhere.

                          Many webservers do still compress content, but this is out of stuck standards and google's recommendation to developers more than a actual technical need.

                          pfSense CE 2.7.2

                          1 Reply Last reply Reply Quote 0
                          • A
                            albgen
                            last edited by

                            @Gertjan:

                            Added to this, what does this :

                            ….nginx https://awesomediocrity.wordpress.com/2017/06/05/confine-webinterface-to-ssh-only-on-pfsense-2-4/ ...

                            it just explains, using 2.4 pfSense beta code, how to tunnel the the GUI access through a SSH tunnel. Tunneling will NOT accelerate things.

                            Checking out the 2.3.4 GUI nginx config, you will find out that CSS, javascript and other files are gzipped …

                            And what the heck is opnfense ? Another patch ?

                            Anyway. The GUI is a tool to set it up. When done, 99,99999 % of the firewall's live time you won't access it anymore.
                            I tend to say that the GUI is fast, very fast already.

                            I wrote that the link is explainig how to make a config for nginx and not for the compression. Two different things!
                            Checking the gui of nginx you will find that is NOT compressed. I dont know where did you see this but the standard is compressing only css (period).
                            We all know what is the gui used for

                            1 Reply Last reply Reply Quote 0
                            • A
                              albgen
                              last edited by

                              @chrcoluk:

                              compressing wont have that kind of benefit, whilst 2mbit is not fast its not dialup either.  HTTP compression was invented in the dialup era when it did actually make a difference.

                              Things like the javascript code sent to your browser is a small amount of data, which a 2mbit line will handle without a sweat unless maybe that line itself is extremely saturated somewhere.

                              Many webservers do still compress content, but this is out of stuck standards and google's recommendation to developers more than a actual technical need.

                              Yes of course but strangly google is compressing every single resource that is passing through http…

                              1 Reply Last reply Reply Quote 0
                              • A
                                albgen
                                last edited by

                                @johnpoz:

                                What specific change did you make in the conf?  While I normally access the pfsense gui locally and its pretty freaking quick - be hard to tell if any speed up unless it was very drastic which I find hard to believe.. The current delays in the page "finishing" is all in the widgets, and the check to see if new version, etc.

                                But I do also access via vpn that has to take the long way around ;)  Chicago to proxy in hou,tx or jax,fl back to chicago - so latency is high.. So I would be curious if your compression makes a difference that is of notice when doing that..

                                Gzip_types which is already there in the config. I added the mime types for other kind of resources

                                1 Reply Last reply Reply Quote 0
                                • GertjanG
                                  Gertjan
                                  last edited by

                                  @albgen:

                                  Checking the gui of nginx you will find that is NOT compressed. I dont know where did you see this but the standard is compressing only css (period).

                                  I was comparing this part of the nginx setup with your finding :

                                  ...
                                                  gzip on;
                                                  gzip_types text/plain text/css text/javascript application/x-javascript text/xml application/xml application/xml+rss application/json;
                                  
                                  ....
                                  

                                  Then I found https://stackoverflow.com/questions/23939722/nginx-gzip-not-compressing-javascript-files : this explains what you are seeing - and what needs to be done  ?

                                  No "help me" PM's please. Use the forum, the community will thank you.
                                  Edit : and where are the logs ??

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.