Welcome Guest, Not a member yet? Register   Sign In
Cache js or css files
#4

Minimizing and concatenating your assets is good practice, but be sure to only concatenate scripts and css that you use on every page of your site. Otherwise you do more harm (in bandwidth) than good.
If you dynamically load all your assets you could end up using http://localhost:8000/asset_feed/script?...]=file2.js on your homepage and on a different page http://localhost:8000/asset_feed/script?...]=file3.js. This way the content of file1.js will be downloaded twice instead of loaded from cache... You migh be better of using http://localhost:8000/asset_feed/script?...]=file3.js on all your pages so their is only one request made. The downside is of course that the first page loads longer.
Reply


Messages In This Thread
Cache js or css files - by ufhy - 08-17-2016, 07:18 PM
RE: Cache js or css files - by mario - 08-17-2016, 10:23 PM
RE: Cache js or css files - by mario - 08-17-2016, 10:39 PM
RE: Cache js or css files - by Diederik - 08-17-2016, 11:46 PM
RE: Cache js or css files - by ufhy - 08-19-2016, 06:35 AM
RE: Cache js or css files - by svennd - 08-21-2016, 02:01 AM
RE: Cache js or css files - by PaulD - 08-21-2016, 05:52 PM
RE: Cache js or css files - by ufhy - 08-22-2016, 11:32 AM
RE: Cache js or css files - by spjonez - 08-26-2016, 06:08 AM
RE: Cache js or css files - by mwhitney - 09-16-2016, 02:02 PM
RE: Cache js or css files - by spjonez - 09-16-2016, 02:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB