Re: Reloading changes JS files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Skip Evans wrote:
Hey all,

I don't know if it's practical to change the name of the file when they are updated, but another thing I found along similar lines reading up on this was something like this was:

ajax/players.js?version=21

Would that also do it?

Not sure what the server is sending for EXPIRES, looking up how to determine that now.

Skip

dhorton@xxxxxxxxxxxxxx wrote:
Use a version numbered name for the js? e.g. ajax/players21.js

What does your server send for the EXPIRES for js files? i.e. what have you
told the browser to cache. What is the browser cache policy?

David



I've never seen the version number actually used except when you take into account that the number MIGHT change which means that they should get a new file when the server loads the page.

Other then that you either have to rely on the client's browser to listen to your "expires" setting, or hope they don't have their browser over-ride yours.

The best thing I can recommend is having the .js code directly coded into the page as you server it instead of linking in the files.

Or write code that is compatible no matter which version of your JS they have.

IE: if you have all of your menus and such in JS code, rethink how you coded. Also remember, not everyone runs JS or JAVA, some of us actually disable it as a matter of course.

Which means your site breaks US federal guidelines when it becomes unusable to those who don't have flash/js/java/shockwave.

Wolf


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux