1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Deferred JS

Discussion in 'XenForo Suggestions' started by Floren, Nov 16, 2013.

  1. Floren

    Floren Well-Known Member

    This small Google tip should help loading the pages faster and also make it compliant to Google guidelines.
    Can we apply this for all external js scripts (Google, Facebook, Twitter, etc.)?

    Rendering for my site.
     
    Last edited: Nov 16, 2013
  2. Marcus

    Marcus Well-Known Member

    Great suggestion.
     
    Adam Howard likes this.
  3. GlobeGains

    GlobeGains New Member

    tommydamic68, Fred. and Adam Howard like this.
  4. nodle

    nodle Well-Known Member

    +1 from me also.
     
    Adam Howard likes this.
  5. Adam Howard

    Adam Howard Well-Known Member

    Yes please, if possible :)
     
  6. feldon30

    feldon30 Well-Known Member

    Adam Howard and Floren like this.
  7. bortrenamo

    bortrenamo Member

    Out of curiosity, in PAGE_CONTAINER moved <xen:include template="page_container_js_head" /> to just before the </body> tag.
    I don't know how to do this with external js.
     
    Adam Howard likes this.
  8. Wuebit

    Wuebit Well-Known Member

    Rendering your site gives me "Backend ErrorDismiss" :p
     
  9. Floren

    Floren Well-Known Member

    The local scripts can be cached with Nginx, I was referring to external scripts that we cannot define an expiration.
    In fact, I'm wondering if is not wise to save them locally and update them every 24hrs... It will help if we could have an option/variable in XenForo where we define the API files locally into templates, so we can download them locally.
     
  10. feldon30

    feldon30 Well-Known Member

    But but... We're supposed to load jQuery through Google's amazerful CDN so the file is coming from a server geographically proximate to their location and loads .00002 seconds faster. ;)

    So this one time, I setup a really long cache of like 30 days on JPG and PNG files which rarely change. Unfortunately I forgot that this also affected a GD-generated image which changes daily, so people were seeing stale images. I had to exclude that directory from my cache rule. Optimizing is great, but it's easy to screw up.

    Trying to find the "right" answer is often dizzying to me. If I had an SEO guru look through my site, they'd flee in horror, but it works, and my Adsense numbers are quite healthy.
     
  11. tajhay

    tajhay Well-Known Member

    PLEASE do this for the next XF version!!
     
    audiokid and Adam Howard like this.
  12. audiokid

    audiokid Active Member

    +1
     
    Adam Howard likes this.
  13. Fred.

    Fred. Well-Known Member

    Yes, Please :D
    +1
     
    Adam Howard likes this.
  14. jamalfree

    jamalfree Active Member

     
    Adam Howard likes this.
  15. tommydamic68

    tommydamic68 Well-Known Member

    And another! (y)
     
    Adam Howard likes this.
  16. Tracy Perry

    Tracy Perry Well-Known Member

    Doing a "+1" means absolutely nothing without liking the original post. ;)
     
    Liam W, Adam Howard and tommydamic68 like this.
  17. audiokid

    audiokid Active Member

    +1

    :)
     
  18. Tracy Perry

    Tracy Perry Well-Known Member

    smart_guy_shaking_head_no_md_clr.gif I see that you still don't get the point. Like the first post and it's shows an indicator of how many would like it. Right now I see that 34 have liked the original post... but your name is not in that list so apparently you don't want it THAT badly.
     
  19. audiokid

    audiokid Active Member

    the OP never mentioned he wanted this added to the build of XF, only suggested it as a work around, which I don't like (as much) is at all..
    But the member who mentioned adding to XF, I liked that comment indeed. Can we not like a post here ? That's how we do it on my forum and have been doing it like this on others for years up until this very thread. :coffee:

    If I had a chance to not like a post, it would be the one you just posted to me, not the OP.

    just having fun now... :D

    (y)
     
  20. Tracy Perry

    Tracy Perry Well-Known Member

    The post is in a node called "XenForo Suggestions" which would lead a reader to believe that the original post text is in reference to the core XenForo software. ;)
    Any other +1's to a post (anywhere in the discussion) are basically a waste of bandwidth and what I consider post padding myself. :rolleyes:
    If you like a specific post (or agree with it) that's what the like feature is for! :p

    But this is digressing off-topic. Every one of my forums warns about this. The add-on that is available causes some problems for me with UI.X for some reason so I can't use it.
     

Share This Page