mirror of
https://github.com/konpa/devicon.git
synced 2025-08-17 20:01:38 +02:00
Feature/website cache busting (#813)
* Feature: Cache busting website data (JavaScript and SVG files) by adding '?version' to these filenames * Updated script.js to use CDN versioning style * Cache busting script.js as well, to load cache busting changes * Website cache busting fix * Cache busting script.js using Date.now() Co-authored-by: Thomas Bui <43018778+Thomas-Boi@users.noreply.github.com>
This commit is contained in:
@@ -24,11 +24,11 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
|
||||
console.log('Unable to determine latest release version, fallback to master.')
|
||||
});
|
||||
|
||||
|
||||
var baseUrl = `https://cdn.jsdelivr.net/gh/${gitHubPath}/`
|
||||
var versionStr = '@' + $scope.latestReleaseTagging;
|
||||
var baseUrl = `https://cdn.jsdelivr.net/gh/${gitHubPath}${versionStr}/`
|
||||
|
||||
// Get devicon.json
|
||||
$http.get(baseUrl + '/devicon.json').success(function(data) {
|
||||
$http.get(baseUrl + 'devicon.json').success(function(data) {
|
||||
|
||||
/*
|
||||
| Re-format devicon.json
|
||||
@@ -126,7 +126,7 @@ devicon.controller('IconListCtrl', function($scope, $http, $compile) {
|
||||
*/
|
||||
$scope.selectSvg = function(svgVersion, index) {
|
||||
|
||||
$http.get(baseUrl + '/icons/' + $scope.selectedIcon.name + '/' + $scope.selectedIcon.name + '-' + svgVersion + '.svg').success(function(data){
|
||||
$http.get(baseUrl + 'icons/' + $scope.selectedIcon.name + '/' + $scope.selectedIcon.name + '-' + svgVersion + '.svg').success(function(data){
|
||||
|
||||
var svgElement = angular.element(data);
|
||||
var innerSvgElement = null;
|
||||
|
Reference in New Issue
Block a user