question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Best way to use LoadJS?

See original GitHub issue

Hey,

Most projects I build always do terrible on Google Page Speed because of async loading and whatnot. I found this library and I’m excited to finally use it because I think this is the approach Google wants me to take for the fastest page render time.

On my sites I use rails which minifies all css and js into single files, and then I also have jQuery (using google CDN so its probably cached). So I’m wondering the best way to use loadJS if I have only 3 files (and I’m not using it as a dependency manager).

  • application.css
  • //ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
  • application.js

Will this cause a FOUC while the CSS loads? Also can I use a absolute URL for a path instead of a local path?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
amoreycommented, Jan 1, 2017

I think this will be a useful issue for others to see so I’m adding an “archive” label and reopening it.

0reactions
amoreycommented, Oct 10, 2019

@tabrez500 Sorry, I don’t know of a way to control what the browser displays in the network calls list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

loadjs examples - CodeSandbox
Learn how to use loadjs by viewing and forking loadjs example apps on CodeSandbox.
Read more >
How to properly load js files - Material Design for Bootstrap
We always should place js link at the and of the body tag, and css links in document head. It also good practice...
Read more >
What is the most ideal way of loading javascript files?
I want to load js files as quickly as possible without using any 3rd party js library. The solution which is similar can...
Read more >
Efficiently load third-party JavaScript - web.dev
Learn how to avoid the common pitfalls of using third-party scripts to ... The preconnect hint is best used for only the most...
Read more >
DevHack: Optimizing initial load JS from Next.js - Elio Struyf
How to lower the first load JS size? Use fewer dependencies. Check through your code if you have dependencies you might be referencing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found