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
Assignees
Labels
Milestone

Comments

@delight
Copy link

@delight 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

This comment has been minimized.

Copy link

@olegomon olegomon commented May 13, 2014

+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

This comment has been minimized.

Copy link

@robinwyss robinwyss commented Jun 6, 2014

+1

3 similar comments
@LDSign

This comment has been minimized.

Copy link

@LDSign LDSign commented Jun 15, 2014

+1

@WhiteHalmos

This comment has been minimized.

Copy link

@WhiteHalmos WhiteHalmos commented Jun 20, 2014

+1

@Jojo-Jojovich

This comment has been minimized.

Copy link

@Jojo-Jojovich Jojo-Jojovich commented Aug 12, 2014

+1

@delight

This comment has been minimized.

Copy link
Author

@delight 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

This comment has been minimized.

Copy link
Member

@tagliala tagliala commented Aug 30, 2014

@delight are you ok now?

@tagliala

This comment has been minimized.

Copy link
Member

@tagliala tagliala commented Aug 30, 2014

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

@delight

This comment has been minimized.

Copy link
Author

@delight delight commented Aug 30, 2014

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

@jukkasi

This comment has been minimized.

Copy link

@jukkasi 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

This comment has been minimized.

Copy link

@rrajewski rrajewski commented Sep 26, 2014

+1

1 similar comment
@jeromegv

This comment has been minimized.

Copy link

@jeromegv jeromegv commented Nov 26, 2014

+1

@ivanjuras

This comment has been minimized.

Copy link

@ivanjuras ivanjuras commented Jan 1, 2015

+1 from me as well

@jordanrynard

This comment has been minimized.

Copy link

@jordanrynard jordanrynard commented Jan 14, 2015

+1

@thielj

This comment has been minimized.

Copy link

@thielj thielj commented Feb 10, 2015

+1

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

This comment has been minimized.

Copy link
Member

@tagliala tagliala commented Feb 11, 2015

Added to 5.0.0 milestone

@swbullis

This comment has been minimized.

Copy link

@swbullis swbullis commented Feb 24, 2015

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>
kingsloi added a commit to kingsloi/kingsleyraspe.co.uk that referenced this issue Mar 22, 2015
@vladimirmartsul

This comment has been minimized.

Copy link

@vladimirmartsul vladimirmartsul commented Mar 23, 2015

+1

1 similar comment
@johnnyshields

This comment has been minimized.

Copy link

@johnnyshields johnnyshields commented May 14, 2015

+1

@scotty6435

This comment has been minimized.

Copy link

@scotty6435 scotty6435 commented May 24, 2015

+1!

@mkurz

This comment has been minimized.

Copy link

@mkurz mkurz commented Jul 4, 2016

+1

@chris-purcell

This comment has been minimized.

Copy link

@chris-purcell chris-purcell commented Jul 19, 2016

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

This comment has been minimized.

Copy link

@andrenarchy andrenarchy commented Jul 19, 2016

@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

This comment has been minimized.

Copy link

@gerrywastaken 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

This comment has been minimized.

Copy link

@andrenarchy andrenarchy commented Jul 19, 2016

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

@lt7

This comment has been minimized.

Copy link

@lt7 lt7 commented Aug 18, 2016

+1

1 similar comment
@juanpablof

This comment has been minimized.

Copy link

@juanpablof juanpablof commented Sep 30, 2016

+1

@danger89

This comment has been minimized.

Copy link

@danger89 danger89 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

This comment has been minimized.

Copy link

@drzraf drzraf commented Nov 1, 2016

See also: w3c/preload#68

@IndigoStarfish

This comment has been minimized.

Copy link

@IndigoStarfish IndigoStarfish commented Apr 24, 2017

+1

@tagliala

This comment has been minimized.

Copy link
Member

@tagliala tagliala commented Dec 17, 2017

Done!

@tagliala tagliala closed this Dec 17, 2017
@drzraf

This comment has been minimized.

Copy link

@drzraf drzraf commented Dec 18, 2017

commit ?

@tagliala

This comment has been minimized.

Copy link
Member

@tagliala tagliala commented Dec 18, 2017

@drzraf please follow #11908

@jocar6562

This comment has been minimized.

Copy link

@jocar6562 jocar6562 commented Dec 30, 2017

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
You can’t perform that action at this time.