Google Maps files being loaded with no reason by Upfront

Upfront is calling google maps scripts while I am logged even if I am not using any map, and even if I am not inside the editor.
1- http://maps.googleapis.com/maps/api/js/AuthenticationService.Authenticate?1shttp%3A%2F%2Fesites.pro%2F&callback=_xdc_._63je4s&token=8666
2- http://maps.google.com/maps/api/js?v=3&libraries=places&sensor=false&callback=upfront_maps_loaded
3- http://csi.gstatic.com/csi?v=2&s=mapsapi3&v3v=24.12&action=apiboot2&libraries=places&rt=main.19
4- http://maps.google.com/maps-api-v3/api/js/24/12/util.js
5- http://maps.google.com/maps-api-v3/api/js/24/12/common.js
6- http://maps.google.com/maps-api-v3/api/js/24/12/stats.js

On top of that these other issues would improve Upfront speed a lot as well. I am dealing with these other ones in other threads though. Just letting you now:
1- http://esites.pro/wp-content/themes/upfront/build/main.js?_=1469500033832 was not supposed to being called while upfrnot editor is off
2- http://esites.pro/wp-content/themes/upfront/styles/editor-interface.min.css?ver=1.1.1 was not supposed to being called while upfront editor is off as well
3- All lightboxes are being called even when it is not being used on the page
4- wp-content/themes/upfront/build/file_upload/jquery.fileupload.js?_=1469575455964
5- Buttons are being created as images, instead of codes like frontend builder plugin

Should I try to manage these not used scripts with one of the plugins this post says (https://css-tricks.com/taking-control-cssjs-wordpress-plugins-load/)? Have you tryied or know about some of these plugins plugins to manage scripts and css queues?

You guys keep saying me that the developers are improving Upfront, but my site is taking even more than 30 seconds to load while logged in and that does not seem to be a hard thing to fix myself. Please help me about that. Thank you!

  • diegpl

    Maybe you could tell me how to queue files based on a var or on a specific url? What is the function that recognizes when upfront is being used? I know there is one because Upfront is called over a parameter on a url, but I already saw it working over the same url of the page... I also asked the queue manager plugin`s developer about a condition to call scripts as well, here: https://wordpress.org/support/topic/a-way-do-dequeue-scripts-just-for-a-specif-url?replies=0#post-8691414
    Thank you!

  • Kasia Swiderska

    Hello diegpl,

    We did ask developers why Upfront is loading so much files when user is logged. Those files ?will? be included for a logged in user that can boot upfront (most cases admin of the site), so we can actually boot the editor when they want to use it. When you can boot editor you can use all of its elements - so if you want use a map element and render it instantly on the page those files have to be there.

    Maybe you could tell me how to queue files based on a var or on a specific url? What is the function that recognizes when upfront is being used?

    I've send message to developers to ask if this is possible and will not harm Upfront editor.

    kind regards,
    Kasia

  • diegpl

    Hmm, it seems that Upfront does not load the whole page again to get on, maybe that is the difficult about to not bring all the css and js when it is off but logged.
    However, the not needed files while logged are taking a lot of time to load the site. As the user will be more time just logged than with the Upfront on, it is still a good idea to think in a way to load these files just when Upfront is on, or even to push the browser to not load they again after already loaded once.
    How does Upfront works? Is it a frame which is activated? Are you sure that there is now way to load these files just when Upfront is really being used?
    I am not the best programmer, but it seems that is possible to do that using jQuery: http://stackoverflow.com/questions/1900874/how-to-add-anything-in-head-through-jquery-javascript
    Thank you! :wink:

  • Rupok

    Hi diegpl, hope you had a wonderful day.

    I've talked with our developer regarding your query. They said Upfront is not a frame. Upfront do preload ?*some* files for users being able to boot upfront, so Upfront Editor is able to actually do so when they click the button. Upfront also doesn't load everything beforehand, and it doesn't do it for everyone.

    For google maps in particular, Upfront needs them pre-loaded to be able to initialize the elements that work with them directly. And those can take ?*a while*? to load, too - which is why they're loaded beforehand.

    That's actually one request we send, and the others are being spawned by the google script (standard behavior when working with maps api).

    Actually it's a very hard fix. There's a lot of moving parts that really have to come together for all of it to work properly.

    Regarding your jQuery query, it's actually way beyond the basic script element management via jquery. There's all sorts of things each with its own dependencies managed as and modules via require.js, plus all sorts of internal WP dependencies that don't follow that format, plus any number of third party dependencies like gmaps API, ace.js etc...

    I hope you understand. Please let us know if you have any confusion. We will be glad to help further.

    Have a nice day. Cheers!
    Rupok

  • diegpl

    Some times I also get stuck with this kind of files appearing on my firebug network tab: data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAGW8AA4AAAAAo7wAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABRAAAABwAAAAcb+kWhkdERUYAAAFgAAAAHwAAACABMQAET1MvMgAAAYAAAABAAAAAYJYFachjbWFwAAABwAAAATwAAAKatulUim
    Could u please take a look at it for me please? Try to reproduce it when you are logged it please as well. Tks.

  • Nithin

    Hi diegpl,

    Hope you are doing good today. :slight_smile:

    it seems to be something related to the fonts, to transform them in graphics. So what do I do? The website is like very, very, very slow.

    These doesn't seem to increase your server load, if you check pingdom, you can see the files causing the load, your server does have a slow response time from 3-4 secs, regarding the Upfront file, you can enable Gzip compression, which should help optimize the dependency files, you can find that under Upfront > Experimental , and check Enable Upfront Compress Response Applies GZip compression to all Upfront-generated responses (AJAX).

    Please do check PageSpeed, for the other factors you can do to optimize your websites.

    Hummingbird plugin, would be a good start when it comes to improving your websites performance.

    have installed a debug bar and debug cron plugin on my site and I found this service running: upfront_hourly_schedule
    What is that? And it is even hourly

    The cron is part of the scheduler hub service for a centralized schedule. The cron doesn't do anything on it's own, the services like undo, previews etc, will try to act if they need, and tries to keep their own time.

    I'm afraid deleting these crons, won't be ideal, the scheduler is also used for removing layout revisions, so removing the schedule will increase your database size, as there isn't any job to remove these unwanted revisions. On the other hand, even if you remove it, it'll re-schedule it anyway.

    Also, cron plugins will just go ahead and include wp-admin/includes/class-wp-list-table.php on all main site requests, this will also cause the website to slow down too.

    Would recommend you to try to optimizing your website, and check whether it improves the overall performance of your website.

    I hope this helps. Please let us know if you still need any further assistance. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • diegpl

    Look at wht I got at pingdom:
    The requests for the following URLs don't fit in a single packet. Reducing the size of these requests could reduce latency.
    data:application/x-font-ttf;charset=utf-8;base6 ... AAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==
    data:application/x-font-ttf;charset=utf-8;base6 ... AAwAAAAAAAAADQAOAAAAAQAAAAAAAAAAAAAAAAABAAAAAA==

    These files are really overloading the site. What these files are? Tks.

  • diegpl

    Does this HummingBird work with w3c cache plugin? Do you have any tutorial about a good w3c custom setting?
    Pingdom also told me "The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources". Is it about the purge time of w3c cache plugin? If yes, how do they know that?
    Pingdom also told me "There are 8 JavaScript files served from esites.pro. They should be combined into as few files as possible." Is that really a good idea? Why?
    Really thank you for your help here. Your are the best! :wink: :smiley:

  • Nithin

    Hi diegpl,

    Hope you are doing good today. :slight_smile:

    The requests for the following URLs don't fit in a single packet. Reducing the size of these requests could reduce latency.

    It's more of a suggestion, these files doesn't see to increase the load, you could reduce the size of these request by minification, and compression which Hummingbird provides.

    Does this HummingBird work with w3c cache plugin? Do you have any tutorial about a good w3c custom setting?

    Hummingbird is not a cache plugin, and should would fine with any cache plugin. What Hummingbird does is browser caching, minification, and Gzip Compression apart from these settings you can setup your cache plugin accordingly. Please do note that enabling both these settings in Hummingbird, and cache plugin would cause conflicts.

    You might find these articles on setting up W3 Total cache helpful:
    http://www.wpbeginner.com/plugins/how-to-install-and-setup-w3-total-cache-for-beginners/
    http://code.tutsplus.com/tutorials/configuring-w3-total-cache-general-settings-i--cms-20920

    Pingdom also told me "The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources". Is it about the purge time of w3c cache plugin? If yes, how do they know that?

    Enabling the browser caching, under Hummingbird > Browser Caching, should solve this one.

    Pingdom also told me "There are 8 JavaScript files served from esites.pro. They should be combined into as few files as possible." Is that really a good idea? Why?

    Yes, minification really helps your site to decrease the load time, as it combines, and compresses your file, so that the amount of data that gets transferred is minimal.

    And about the WP-Optmize plugin (database optimizer) the guy said here: https://premium.wpmudev.org/forums/topic/how-to-change-default-font-sitethemewide-in-upfrontchildtheme#post-1089714
    Would that really be helpful to improve the site speed as well?

    I think the issue what you have is different, as I could also notice that your server has a slow response time of about 3 sec. Cron jobs like upfront_hourly_schedule would make sure your database doesn't grow large in size, even if you clear the database the results would be marginal.

    I hope this helps. Please let us know if you still need any further assistance. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi diegpl,

    Hope you are doing good today. :slight_smile:

    So, lets see if I got it now, I should not just turn this settings on at the same time for Hummingbird and W3C: browser caching, minification, and Gzip Compression?

    Yes, I meant if these settings are enabled in both the plugins, it could cause conflicts.

    If yes, which one is better for browser caching and minification? And why? And about Gzip Compression, does W3C have it as well?

    W3C should have GZip compression. The principles behind browser caching, and minification would be the same for both the plugins, but I'm not sure how it's implemented in W3C. Hummingbird has it's own minification engine, and you can tweak each files while minified, and move it along header, and footer accordingly.

    And if this feature is already enabled "Enable Upfront Compress Response Applies GZip compression to all Upfront-generated responses (AJAX)" do I still need to compress the Upfront files? Will this feature also cause conflicts with the Hummingbird and W3C as well?

    Upfront only offers compression of ajax request carried out by the theme, you'll still have to make use of Gzip compression, and the Upfront feature won't cause any conflicts with Hummingbird.

    I hope this helps. Please advise if had missed out anything. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Kasia Swiderska

    Hello diegpl,

    What does this "application:data" file do? Are you sure it does not prevent a good website loading? As the image shows it takes too long to load:

    That is font file http://sosweetcreative.com/2613/font-face-and-base64-data-uri

    It allows inclusion of small data items as "immediate" data, as if it had been included externally.

    http://www.ietf.org/rfc/rfc2397.txt

    How does Hummingbird work for wpms? I am seeing improvement tips just about my main site...

    Yes, because everything except the minification is available for main site, but will have impact on whole network (gzip and browser caching is enabled for whole network). On subsites you will see only minification section.

    Because I run the check files and see /wp-includes/js/wp-embed.min.js on the list, and at the same time it shows it combined with others on the footer. Does this setting take a while to get really working on the site? Because I do not see the modifications through firebug.

    It should be applied when clicking Save changes. Do I understand correctly that when you click save changes this file is not combined with other files? It is still in site source as independent file?

    How do I see the minified files on firebug? What will be the name of it? Right now I am seeing just the same files as always.

    Minified and combined files will be under one or more files in hummingbird cache directory. It looks like that in website source (example is from my localhost site)

    src='http://localhost/wpnoper/wp-content/uploads/wp-hummingbird-cache/46ad28ae06e5ebeaa6f29f4431f62e5f.js'

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.