Versioning in a CDN

南楼画角 提交于 2019-12-05 17:39:27

It turns out my solution:

<link rel="stylesheet" href="<?= 'http://cdn.externaldomain.com' . auto_version('/css/base.css') ?>" type="text/css" />

works. I'd just missed out a space in the code.

Just a suggestion: Have a look at Aptimize

Versioning issues solved. Many CDNs perform only periodic version checking – meaning pages can be served with out-of-date resources. Aptimize actively detects version changes and ensures pages stay up-to-date, with a unique auto-URL versioning mechanism and aggressive caching of resources on the browser.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!