Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4125720
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:54:24+00:00 2026-05-20T23:54:24+00:00

Is it possible to block the downloading of external scripts/stylesheets with a bit of

  • 0

Is it possible to block the downloading of external scripts/stylesheets with a bit of javascript? For example, putting a tiny block of javascript at the very top of <head> to do some operation on all <script> and <link> tags in the document, perhaps changing relative paths to absolute paths, before their original relative-path’d sources are downloaded from the server?

I am not looking for alternatives such as server-side processing or manually altering the <script> and <link> tags. I am interested in a proof-of-concept for the scenario where i have no control over the final document or it’s generation except for inserting a single script tag.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:54:25+00:00Added an answer on May 20, 2026 at 11:54 pm

    No, you cannot.

    The problem is in the head of the document the script will not have access to the nodes that are not yet loaded, so it cannot modify any script tags that will be coming up.

    Also, the browser loads JavaScript as soon as it gets to the script tag and halt parsing the html until the script tag completes.

    That means, there is no way of doing it with JavaScript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: HTML comments in a javascript block? Hello im cleaning a web page
Would it be possible to block Tor users? ( https://www.torproject.org/ ) Due to the
I would like to know if it is possible for block elements, floated in
Possible Duplicate: How to block a website programatically using DotNet HAI I am developing
Is possible to catch more then one exception in the same catch block? try
Is it possible to allocate an arbitrary memory block using the new operator? In
Is it possible to have one jQuery ready block executed after all others have
is it possible to declare more than 1 block in a module? I tried
Possible Duplicate: Django switching, for a block of code, switch the language so translations
Is it possible to use MySQL with the data access application block? The existing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.