Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The locally-installed docs try to load non-local assets, causing them to fail on a bad connection. #51625

Open
umanwizard opened this issue Jun 18, 2018 · 1 comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@umanwizard
Copy link
Contributor

The locally-installed docs that open when you use rustup docs try to load a few assets from a CDN. This is fine if you have no network connection at all, because they will fail quickly and the page will render.

However, if you have a very poor/slow network connection, they will try to load, and nothing on the page will render.

Please make the locally-installed docs not depend on non-local resources at all.

@jonas-schievink jonas-schievink added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Jan 27, 2019
@jsha
Copy link
Contributor

jsha commented Sep 21, 2022

I checked over the rustup-installed docs using the command below, and found that the std / rustdoc docs don't appear to have this problem, but the book loads its logo and favicon from an Internet URL. Also the Clippy book appears to use mdBook's MathJax support, which is inserting <script async type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">. Note: the async there may have been added since 2018 when this issue was filed, and probably alleviates the performance problem on a slow connection.

$ cd ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu && rg 'src=.https?://|<link[^>]*href=.https?://' -l | sort          share/doc/rust/html/book/associated-types.html
share/doc/rust/html/book/attributes.html
share/doc/rust/html/book/bibliography.html
share/doc/rust/html/book/borrow-and-asref.html
share/doc/rust/html/book/casting-between-types.html
share/doc/rust/html/book/choosing-your-guarantees.html
share/doc/rust/html/book/closures.html
share/doc/rust/html/book/comments.html
share/doc/rust/html/book/compiler-plugins.html
share/doc/rust/html/book/concurrency.html
share/doc/rust/html/book/conditional-compilation.html
share/doc/rust/html/book/const-and-static.html
share/doc/rust/html/book/crates-and-modules.html
share/doc/rust/html/book/deref-coercions.html
share/doc/rust/html/book/documentation.html
share/doc/rust/html/book/drop.html
share/doc/rust/html/book/effective-rust.html
share/doc/rust/html/book/enums.html
share/doc/rust/html/book/error-handling.html
share/doc/rust/html/book/ffi.html
share/doc/rust/html/book/functions.html
share/doc/rust/html/book/generics.html
share/doc/rust/html/book/getting-started.html
share/doc/rust/html/book/glossary.html
share/doc/rust/html/book/guessing-game.html
share/doc/rust/html/book/if.html
share/doc/rust/html/book/if-let.html
share/doc/rust/html/book/iterators.html
share/doc/rust/html/book/lifetimes.html
share/doc/rust/html/book/loops.html
share/doc/rust/html/book/macros.html
share/doc/rust/html/book/match.html
share/doc/rust/html/book/method-syntax.html
share/doc/rust/html/book/mutability.html
share/doc/rust/html/book/operators-and-overloading.html
share/doc/rust/html/book/ownership.html
share/doc/rust/html/book/patterns.html
share/doc/rust/html/book/primitive-types.html
share/doc/rust/html/book/procedural-macros.html
share/doc/rust/html/book/raw-pointers.html
share/doc/rust/html/book/README.html
share/doc/rust/html/book/references-and-borrowing.html
share/doc/rust/html/book/release-channels.html
share/doc/rust/html/book/strings.html
share/doc/rust/html/book/structs.html
share/doc/rust/html/book/SUMMARY.html
share/doc/rust/html/book/syntax-and-semantics.html
share/doc/rust/html/book/syntax-index.html
share/doc/rust/html/book/testing.html
share/doc/rust/html/book/the-stack-and-the-heap.html
share/doc/rust/html/book/trait-objects.html
share/doc/rust/html/book/traits.html
share/doc/rust/html/book/type-aliases.html
share/doc/rust/html/book/ufcs.html
share/doc/rust/html/book/unsafe.html
share/doc/rust/html/book/unsized-types.html
share/doc/rust/html/book/using-rust-without-the-standard-library.html
share/doc/rust/html/book/variable-bindings.html
share/doc/rust/html/book/vectors.html
share/doc/rust/html/clippy/configuration.html
share/doc/rust/html/clippy/continuous_integration/github_actions.html
share/doc/rust/html/clippy/continuous_integration/index.html
share/doc/rust/html/clippy/continuous_integration/travis.html
share/doc/rust/html/clippy/development/adding_lints.html
share/doc/rust/html/clippy/development/basics.html
share/doc/rust/html/clippy/development/common_tools_writing_lints.html
share/doc/rust/html/clippy/development/index.html
share/doc/rust/html/clippy/development/infrastructure/backport.html
share/doc/rust/html/clippy/development/infrastructure/book.html
share/doc/rust/html/clippy/development/infrastructure/changelog_update.html
share/doc/rust/html/clippy/development/infrastructure/index.html
share/doc/rust/html/clippy/development/infrastructure/release.html
share/doc/rust/html/clippy/development/infrastructure/sync.html
share/doc/rust/html/clippy/development/proposals/index.html
share/doc/rust/html/clippy/development/proposals/roadmap-2021.html
share/doc/rust/html/clippy/index.html
share/doc/rust/html/clippy/installation.html
share/doc/rust/html/clippy/lints.html
share/doc/rust/html/clippy/print.html
share/doc/rust/html/clippy/usage.html
share/doc/rust/html/complement-design-faq.html
share/doc/rust/html/complement-lang-faq.html
share/doc/rust/html/complement-project-faq.html
share/doc/rust/html/edition-guide/print.html
share/doc/rust/html/edition-guide/rust-2018/new-keywords.html
share/doc/rust/html/edition-guide/rust-2018/path-changes.html
share/doc/rust/html/edition-guide/rust-2018/trait-fn-parameters.html
share/doc/rust/html/grammar.html
share/doc/rust/html/guide-crates.html
share/doc/rust/html/guide-error-handling.html
share/doc/rust/html/guide-ffi.html
share/doc/rust/html/guide.html
share/doc/rust/html/guide-macros.html
share/doc/rust/html/guide-ownership.html
share/doc/rust/html/guide-plugins.html
share/doc/rust/html/guide-pointers.html
share/doc/rust/html/guide-strings.html
share/doc/rust/html/guide-tasks.html
share/doc/rust/html/guide-testing.html
share/doc/rust/html/guide-unsafe.html
share/doc/rust/html/intro.html
share/doc/rust/html/not_found.html
share/doc/rust/html/reference.html
share/doc/rust/html/rustdoc.html
share/doc/rust/html/rust.html
share/doc/rust/html/tutorial.html
share/doc/rust/html/version_info.html

@GuillaumeGomez GuillaumeGomez added A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools and removed T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

4 participants