RSS Feed/News How to implement cachebusting / versioning for an external file called within a template

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
23,324
Points
823

Reputation:

At times I call external .css and .js within templates. I would like to able to use XenForo's built in cache busting for this. Without referencing PHP filemtime directly within a template what is the best way to go about this?

Sample css reference within template:

Code:

<link rel="stylesheet" href="https://www.mysite.com/styles/custom.css" type="text/css" />

Continue reading...
 
Status
Not open for further replies.
Top