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

Solve updateSelectInput bug in IE 11.0 #1277

Merged
merged 6 commits into from
Aug 9, 2016
Merged

Conversation

bborgesr
Copy link
Contributor

@bborgesr bborgesr commented Aug 8, 2016

Fixes #1257

@wch
Copy link
Collaborator

wch commented Aug 8, 2016

Are there any drawbacks to using cache: false?

@jcheng5
Copy link
Member

jcheng5 commented Aug 8, 2016

Doesn't seem like there's much downside. It adds some crud to the URL to bust the cache. I guess if the data hasn't changed and you hit the URL several times, it might be making unnecessary requests?

Our other option is to do this on the server side--add the cache-busting parameter to the registerDataObj method that forms the URL that is sent to the client. The benefits of this are 1) this problem will be solved for all clients--nobody else need remember set cache:false, and 2) you'd actually get some desirable caching behavior (i.e. you wouldn't have the problem in the previous paragraph).

@bborgesr
Copy link
Contributor Author

bborgesr commented Aug 8, 2016

Ok, changed it to your suggestion, Joe. It seems to work equally well. I basically added a pseudoparam that sticks in the timestamp in the URL, tricking the browser into thinking that it's a new page so caching doesn't occur. This is how I think it's done by ajax anyway: " It works by appending "_={timestamp}" to the GET parameters." (http://api.jquery.com/jquery.ajax/). What do you think?

@@ -59,7 +59,7 @@ $.extend(selectInputBinding, {
selectize.settings.load = function(query, callback) {
var settings = selectize.settings;
$.ajax({
cache: false,
//cache: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just delete this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, no reason, just because I wasn't sure this was really better than the alternative, so I was just experimenting with it, pending feedback. But it seems like there's no objections, so I'll get rid of it.

@bborgesr bborgesr merged commit 0135998 into master Aug 9, 2016
@bborgesr bborgesr deleted the barbara/bugfix/select branch August 9, 2016 18:08
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.

3 participants