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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:41:24+00:00 2026-06-09T10:41:24+00:00

We can see many HTML page using src=//example.com/myjavascript.js to include a .js and let

  • 0

We can see many HTML page using src="//example.com/myjavascript.js" to include a .js and let the browser use http:// / https:// depending on the current scheme of the page URL.

Is this a valid URI ?

  • 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-09T10:41:25+00:00Added an answer on June 9, 2026 at 10:41 am

    Yes, it is definitely valid. It is a “scheme relative” or “protocol relative” URI. In the spec since the beginning. Quite helpful to deal with http/https issues.

    Read a much better description and caveats:
    Is it valid to replace http:// with // in a <script src="http://…">?

    A few points to keep in mind:

    • There are some minor issues on IE 7 & 8 with double downloads
    • If you are viewing an HTML page from a file the browser will replace the scheme with file://, and not load your JS file from the server like it would with a full URL starting with http:// or https://.

    Edit for modern webdev practices:

    While the URL is still valid, it is now recommended to use https for third party resources (and, serve those resources from secure pages). The performance or compatibility issues from years ago are largely resolved with updated protocols and browsers.

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

Sidebar

Related Questions

I can see there are many ways to use jQuery safely in the javascript
I've seen many similar errors, but I can't see a solution that applies to
When learning C I see that printf can receive many arguments as it is
I have a page with many HTML lines like this: <ul><li><a href='a_silly_link_that_changes_each_line.php'>the_content_i_need</a></li></ul> Now as
Using rails3 - I have a project with many tasks. I want to use
I have a simple HTML page (ratings.html) that I'm trying to test using HtmlUnit.
Good Afternoon, I have a html aspx page that has many many div elements.
I'm using the plugin Tiny Carousel ( http://baijs.nl/tinycarousel ), but I can't find a
I'm using TinyMCE to let users edit and format text, output is html code.
I'm trying to link to the following html page using $.mobile.changePage( myPage.html, { transition:

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.