Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Urls beginning with // are converted to relative path. #3

Open
wforney opened this issue Mar 19, 2011 · 3 comments
Open

Urls beginning with // are converted to relative path. #3

wforney opened this issue Mar 19, 2011 · 3 comments

Comments

@wforney
Copy link

wforney commented Mar 19, 2011

This may seem like a helper, but the :// search on line 261 should just be // because you then don't have to worry about whether it's ssl or not and can pass in a script path like this:

//www.mysite.com/scripts/whatever.js

and it will use http or https depending on what mode the page is in. if you force urls to have http: or https: in them then we have to do an unnecessary script check for ssl and provide an alternate url.

that may be an option to add to this... I might suggest the following:

minurl = local min url on your domain
url = local url on your domain
cdnminurl = CDN min url
cdnurl = CDN url

and then add ssl to all those for ssl versions. unless you want to add the ssl check in the loader itself and have it change the script urls appropriately...?

@wforney
Copy link
Author

wforney commented Mar 19, 2011

note that some scripts' urls are not just as simple as flipping http:// to https:// ... facebook was guilty of this before, and there are others, where they add ssl. to the host and such... jquery is one. their cdn doesn't support https so i have a check on it and use theirs for non-ssl and another one for https...

@wforney wforney closed this as completed Mar 19, 2011
@wforney
Copy link
Author

wforney commented Mar 19, 2011

one other thing that is a gripe of mine, though i understand why it isn't always a best practice to do this, is the lack of a way to say give me the latest version on the msft cdn. the google one has it but it has performance issues on theirs. (change version number from 1.5.1 to 1 on theirs and it works and gives latest version of 1.x.x, similarly, 1.5 does the same thing)

@BorisMoore BorisMoore reopened this Mar 20, 2011
@BorisMoore
Copy link
Owner

I hope to look into these suggestions, but it may be a little while before being able to address them...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants