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 9029165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:11:06+00:00 2026-06-16T07:11:06+00:00

PAY ATTENTION! You can’t include Github scripts directly from Github after this change .

  • 0

PAY ATTENTION!

You can’t include Github scripts directly from Github after this change.

We added the X-Content-Type-Options: nosniff header to our raw URL responses way back in 2011 as a first step in combating hotlinking. This has the effect of forcing the browser to treat content in accordance with the Content-Type header. That means that when we set Content-Type: text/plain for raw views of files, the browser will refuse to treat that file as JavaScript or CSS.

But there are alternatives. Check my answer to this question.


I am trying to include a JavaScript file from GitHub into a local HTML file for testing (like an image found on the internet: <img src="http://...">).

I would like something like this:

<script src="https://github.com/[username]/[repository]/blob/master/public/[fileName].js"></script>

The problem is that this doesn’t work.

How can I do this?

  • 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-06-16T07:11:07+00:00Added an answer on June 16, 2026 at 7:11 am

    https://rawgit.com has been shut down. This answer is unfortunately no longer relevant.



    You will be able to do it with a URL similar to this:

    https://rawgit.com/h5bp/html5-boilerplate/master/src/js/plugins.js
    

    Note that this is not the same as clicking on the "raw" button within GitHub;
    that button will also give you a clean version of the file, but it will be sent
    with the wrong headers.


    A Word of warning; the file is not not being served from GitHub. It is being
    redirected through the rawgit.com domain. As is stated on https://rawgit.com:

    Hey! rawgit.com is just for fun and is not associated with GitHub in any
    way.

    Keep in mind that the owner of that domain is now in control of the traffic and
    is able to manipulate it as they see fit.

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

Sidebar

Related Questions

How we can color a canvas like this: If pay attention,color cahnges relative to
Hi guys thanks for pay attention to this. Well im trying to replace every
Like this site Pay attention to your address bar.
I've come to Java from C++. In the C++ world we pay attention to
I've got this WCF service contract (heavily simplified, but pay attention to the namespace
I want to execute a piece of code So that users can pay attention
Pay attention carefully because this is a hell of a question ;-) I want
I'm considering using Joda-Time . I'm wondering if I should pay attention of what
First of all, what's the difference between: www.domain.com and domain.com Should I pay attention
I have pay now form on my page and after user finishes his payment

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.