Jump to content

Updated Javascript/CSS filenames should contain version

KT Walrus

Recommended Posts

I see you released a new version of prototype.js. The updated file uses the same filename meaning that many users will not see the update due to the old file being cached in their browsers and the updated file has the same filename.

Seems to me that it would be much more friendly to add a version tag to all loaded Javascript files (and CSS files and even the style_image files). The ACP could have a "check for updated cacheable files" operation that scans the directories containing such files (looking for newer version tags) and remembers these version tags to use when emitting html references to these files. Then, when a user visits, they are guaranteed to be using the consistent set of files that match the generated html.

Many users just aren't technical enough to "flush the browser cache" when something on the site isn't looking or working quite right. The board software should be more user friendly since updates to these files are inevitable over time.

Link to comment
Share on other sites

The CSS and javascript files should get reloaded upon a board upgrade, they do have the version number in the URL it tries to load:

<link rel="stylesheet" type="text/css" media='screen' href="http://community.invisionpower.com/public/min/index.php?ipbv=31007&amp;f=public/style_css/css_1/links.css,public/style_css/css_1/calendar_select.css,public/style_css/css_1/ipb_common.css,public/style_css/css_1/ipb_editor.css,public/style_css/css_1/ipb_styles.css,public/style_css/css_1/ipb_board_index.css,public/style_css/prettify.css" />

<script type='text/javascript' src='http://community.invisionpower.com/public/min/index.php?ipbv=31007&amp;g=js'></script>

<script type='text/javascript' src='http://community.invisionpower.com/public/min/index.php?ipbv=31007&amp;charset=iso-8859-1&amp;f=public/js/ipb.js,public/js/ips.quickpm.js,public/js/ips.sharelinks.js,public/js/ips.editor.js,public/js/ips.topic.js,public/js/ips.rating.js,cache/lang_cache/1/ipb.lang.js' charset='iso-8859-1'></script>

This patch they did today was an unusual case, I can't ever remember it being done before. Under normal circumstances, when these files are updated when you upgrade your board, the version number in these URLs will be different and the files will be redownloaded instead of used from the cache.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...