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

MapBBCode Loader #235

Merged
merged 3 commits into from Dec 25, 2013
Merged

MapBBCode Loader #235

merged 3 commits into from Dec 25, 2013

Conversation

Zverik
Copy link
Contributor

@Zverik Zverik commented Dec 25, 2013

Hi! This is a supplemental script for MapBBCode library, which loads that library only when it's needed. It is possible to create map plugins for forums with this file alone — and if it's uploaded to a CDN, with no files and no editing at all! There will be an article on habrahabr on that tomorrow :)

The catch is, I'd like to update files in this project when minor versions of MapBBCode are released, so users won't have to worry about those releases. Is it possible, or I will have to create new version every time?

If it's ok, please merge this project to your CDN. Thanks!

@jimaek
Copy link
Member

jimaek commented Dec 25, 2013

Would latest version work http://www.jsdelivr.com/wiki/latest-versions ?

@Zverik
Copy link
Contributor Author

Zverik commented Dec 25, 2013

Not quite: I'd prefer to keep loader 1.2 to 1.2.x version of MapBBCode, 1.3 to 1.3.x and so on.

@Zverik
Copy link
Contributor Author

Zverik commented Dec 25, 2013

if that's not desirable, I can just synchronize loader versions with mapbbcode versions, releasing new loader version along mapbbcode every time. It's no big trouble. I'll have to undo this pull request in that case and submit a new one, for 1.2.0.

@jimaek
Copy link
Member

jimaek commented Dec 25, 2013

Technically you can update existing files since you are the author. The problem is the caching.
All CDNs and servers would have the old versions cached. I have a special rule for latest to limit cache to 7 days.
If its possible to create new versions every time then that would be the best way to do it.

If not then we can talk about it and find some solution.

@Zverik
Copy link
Contributor Author

Zverik commented Dec 25, 2013

All right, I'll resubmit the pull request. (oh wait, I don't have to resubmit pull request, just update this one)

But apart from that, I think it would be nice to have version-dependent latest. There are two ways this can be done (examples from that wiki page):

//cdn.jsdelivr.net/abaaso/latest/3.8/abaaso.js

Loads version 3.8.16 if it is the latest version in 3.8 branch. /latest/3/abaaso.js will return the latest version in 3 branch: e.g. 3.11.5.

//cdn.jsdelivr.net/abaaso/3.8/abaaso.js

This will load version 3.8 if there is a directory for it, or the latest version in 3.8 branch (3.8.16) it there isn't. There might be a problem if author doesn't keep version format consistent.

jimaek added a commit that referenced this pull request Dec 25, 2013
@jimaek jimaek merged commit aae7c41 into jsdelivr:master Dec 25, 2013
@jimaek
Copy link
Member

jimaek commented Dec 25, 2013

I want to make the URLs more dynamic but my problem is reliability. With static files I know 100% the user will get the contents of the file. But for example if I create a PHP script to handle different parameters like the versions you said then a lot of new points of failure are added. script code, php-fpm, MySQL, server load...

@Zverik Zverik deleted the loader branch December 25, 2013 20:20
@Zverik Zverik mentioned this pull request Dec 25, 2013
megawac pushed a commit to megawac/jsdelivr that referenced this pull request Mar 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants