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

Remove query strings from static resources #3286

Closed
delight opened this issue Apr 20, 2014 · 56 comments
Closed

Remove query strings from static resources #3286

delight opened this issue Apr 20, 2014 · 56 comments
Assignees
Milestone

Comments

@delight
Copy link

delight commented Apr 20, 2014

Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL

turn
http://iplocator.herokuapp.com/fonts/fontawesome-webfont.woff?v=4.0.3

into
http://iplocator.herokuapp.com/fonts/fontawesome-webfont-4.0.3.woff

@tagliala tagliala added feature and removed feature labels Apr 20, 2014
@olegomon
Copy link

+1

It is also difficult to generate appropriate urls for application cache manifest. You cannot simply take file names for the urls to make the cache work properly. You also have to consider the current version with the query string for the urls inside the manifest. Which is not as simple as taking the filenames.

@robinwyss
Copy link

+1

3 similar comments
@LDSign
Copy link

LDSign commented Jun 15, 2014

+1

@ghost
Copy link

ghost commented Jun 20, 2014

+1

@Jojo-Jojovich
Copy link

+1

@delight
Copy link
Author

delight commented Aug 30, 2014

#3286 is older then #3823 and #3823 is different!
Also #663 is different - just because it is about the versioning it does not mean that those issues are all the same. Please be cautious about such things.

@tagliala
Copy link
Member

@delight are you ok now?

@tagliala
Copy link
Member

@delight have you also read why I referred this issue from #663? Could you please read the following comment: #663 (comment)?

@delight
Copy link
Author

delight commented Aug 30, 2014

I don't get it - what's your point ?

@jukkasi
Copy link

jukkasi commented Aug 30, 2014

+1

Because versioning is using query strings it is impossible to get fontawesome files to get added to HTML5 application cache and ugly workaround is needed

http://stackoverflow.com/questions/24055244/webfont-font-awesome-not-working-corrently-offline

I think the version should be in the file names itself which is the recommended way to do versioning

http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/

@rrajewski
Copy link

+1

1 similar comment
@jeromegv
Copy link

+1

@ivanjuras
Copy link

+1 from me as well

@jordanrynard
Copy link

+1

@thielj
Copy link

thielj commented Feb 10, 2015

+1

@tagliala tagliala added this to the 5.0.0 milestone Feb 11, 2015
@tagliala
Copy link
Member

Added to 5.0.0 milestone

@swbullis
Copy link

As a way to bypass this for Offline Cache you can added a custom style directly after loading the font awesome css library with them removed.

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

<style>
/*Temporary Fix for Font Awesome ApplicatonManifest offline Cache */
@font-face {
     font-family: 'FontAwesome';
     src: url('../fonts/fontawesome-webfont.eot');
     src: url('../fonts/fontawesome-webfont.eot') format('embedded-opentype'),       url('../fonts/fontawesome-webfont.woff2') format('woff2'), url('../fonts/fontawesome-webfont.woff') format('woff'), url('../fonts/fontawesome-webfont.ttf') format('truetype'), url('../fonts/fontawesome-webfont.svg') format('svg');
       font-weight: normal;
       font-style: normal;
}
</style>

@vladimirmartsul
Copy link

+1

1 similar comment
@johnnyshields
Copy link

+1

@scotty6435
Copy link

+1!

@chris-purcell
Copy link

A work around has been posted. As well, if you place the fonts on the server (or in your CDN) you don't have to use the query string at all. You only need the query string when accessing the fonts from fontawesome's servers. No fix is needed on their end. This is an end user comprehension issue.

@andrenarchy
Copy link

@chris-purcell the query string is included here so we're all using it by default. The query string confuses caches and breaks browser extensions by default. Of course, we can overwrite @font-face. The purpose of this issue is to fix it upstream so everyone benefits from it.

@gerrywastaken
Copy link

gerrywastaken commented Jul 19, 2016

This is an end user comprehension issue.

@chris-purcell Wow, in my case you are correct. It seems I had googled for the problem I was having and ended up on a bug report on the wrong repo. My issue was actually with the addition of version strings to font-awesome in a popular Rails gem. Which it seems, was actually an issue that was fixed 27 days ago:
bokmann/font-awesome-rails#175

@andrenarchy
Copy link

@gerrywastaken this is exactly what we're all doing now. It'd be great to have it fixed upstream.

@lt7
Copy link

lt7 commented Aug 18, 2016

+1

1 similar comment
@juanpablof
Copy link

+1

@melroy89
Copy link

melroy89 commented Nov 1, 2016

Based on the reference from @rmm5t . FontAwesome needs to take this bugfix along, thus somebody needs to merge this change and it will be fix finally in CDN from Bootstrap.

@drzraf
Copy link

drzraf commented Nov 1, 2016

See also: w3c/preload#68

@IndigoStarfish
Copy link

+1

@tagliala
Copy link
Member

Done!

@drzraf
Copy link

drzraf commented Dec 18, 2017

commit ?

@tagliala
Copy link
Member

@drzraf please follow #11908

@jocar6562
Copy link

src: url('../fonts/fontawesome-webfont.eot?v=4.6.3');
src: url('../fonts/fontawesome-webfont.eot') ;
took out the ?v=4.6.3 not sure what that was for but could see no difference after testing
This worked fine it was the last thing I needed to do now I have speeded up landing page to 625 mil sec johnc

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