Jump to content
Ketarin forum

URL without a protocol support (// URIs)


shawn
 Share

Recommended Posts

There's an amazingly annoying trend on newer sites to remove the protocol portion of the URL (http:, https:, ftp:) leaving URIs that have only something like:

//example.com/path/file.ext

 

Google is just one example of the major companies who are using this format in their recent downloads. Picasa, for example. This method is used by many websites now to minimize errors when the potential to switch back and forth between SSL and non-SSL sites is likely.

 

Essentially, this would work by checking the URL that is in the download (and other URL sources such as variables) to see if the first two characters are "//" and if so, it inserts "http:" there.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.