[wp-trac] [WordPress Trac] #38148: Do not store URL protocol in the database

WordPress Trac noreply at wordpress.org
Fri Sep 23 20:24:27 UTC 2016


#38148: Do not store URL protocol in the database
-------------------------+------------------------------
 Reporter:  aristath     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by aristath):

 I'm not talking about relative vs absolute URLs... Relative URLs strip the
 domain completely and we wouldn't want to do that.

 What I'm suggesting is simply stripping the protocol (http or https) from
 the URL which is a very different thing.
 Stripping the protocol would ensure compatibility with both http & https
 sites no matter if the user changes from one to the other.

 Furthermore it will not break anything since if the saving process changes
 then only new assets will use the stripped format, while old ones will
 still have the protocol included.
 This will not affect anything on any site running WordPress...
 Current sites that already have assets will use the format they're already
 using for existing images, and new images will have the protocol stripped.
 New sites however will be a lot cleaner since all assets will not include
 the protocol when they're saved in the db, so if they decide to switch
 from http to https at some point it will be a lot easier for them.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38148#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list