Protocol Relative URLs

Categories

Component ID

2461365

Component name

Protocol Relative URLs

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

4186

Component created

Component changed

Component body

Protocol Relative URLs makes all file URLs generated by Drupal to be protocol relative.

What are protocol relative URLs?

Protocol relative URLs look like: //example.com/foo/bar. Dropping the protocol from the URL allows your web browser to assign the current protocol to the URL. So, if you are visiting the site in HTTPS mode, links will point to HTTPS, and if you are visiting the site in HTTP mode, links will point to HTTP.

* Note: protocol relative URLs will cause IE7/8 to download stylesheets twice.

This code was originally obtained from GitHub.