Tuesday, March 11, 2014

Do not rename the file, you just change the name on the line that loads it. The idea of the time s


box-sizing seekers android clone clone clone complex objects objecs dropbox facebook codeigniter css design html javascript ios less open graph icons Design Patterns split coast stampers redesign projects snippets php sql web usability sublime text 2 windows 8
When you work on a website and you're constantly making changes in CSS or JavaScript not have problems. You can avoid frisked or just force them to cool. Once you publish the page you set it all to be cached split coast stampers for a long time and brindas yourself for being a genius.
The problem comes when you work in a web where both file types are constantly changing. Want to be frisked to avoid constantly downloading everything and go faster, but you also want that when you change something the visitor can see the changes and will not remove the page. How did before
Both Airsofters.ES Subculture and I followed a similar approach. All minifica CSS code in a single file and renaming each time was a change of style style.21.css, style.22.css, split coast stampers etc was done. So the browser is forced to upgrade.
The aim is that this CSS route change every time the file is modified. This can be achieved with the filemtime () function of PHP. Returns a unix timestamp of the last modification. This way you save the file where you will modify the HTML every time you modify the CSS or JS. You just put it like this: <link rel = "stylesheet" href = "/ css / style.css split coast stampers <= @ filemtime ('/ css / style.css.')>??"> <Script src = "/ js / code.js? <? = @ filemtime ('. / js / code.js')> "> split coast stampers </ script>
Few and mostly avoidable. I have not been tested yet, but as I read, use filemtime () in many files you can load significantly split coast stampers slower. In my case I only use two files (and yours should be the same), so I do not care.
On the other hand, use querystrings can cause problems for caching split coast stampers files in some ugly old proxies. Again, I assumed greater split coast stampers advantage not a disadvantage, so do not give too many turns.
Do not rename the file, you just change the name on the line that loads it. The idea of the time stamp is also interesting, but then the author says it is "bad practice". Why?
Until I switched to this method is how I did. Style.24.css put eg. Same thing, split coast stampers only you will have to be renaming the file and editing the head every time I modified. Although they are seconds are seconds you lose and you can save.
What to use time () is a bad practice because the file is not cached, as each second changes the route because of the function. Use in development environments can be passable, but well out in production split coast stampers makes no copies split coast stampers to cache.
Okay, I had misread the reviews. Do not rename the file, only the querystring, which is the same as I do with filemtime (). It's exactly split coast stampers the same, just that doing it this way I save change the view containing the head with the file upload.
Okay, then: "style.css v = Echo time ()?" Not cache the file because the name changes every second, but: "style.css miss filemtime ()" if it caches the file because the name changes only if modifies the.
What you say is correct. But remember that the topic of cache files depends on more things like you use in configuration. Htaccess. I'll do a post about it, but I find lots of information online.
You can use these HTML tags: <a href="" title=""> split coast stampers <abbr title=""> split coast stampers <acronym title=""> <b> <blockquote cite=""> <cite> <code> <datetime = ""> <em> <i> <q cite=""> <strike> split coast stampers <strong>
Footer under construction 2014 Cyneek

No comments:

Post a Comment