HP Clear Cache
Generate URLs for all HP locales
by beradrian
HTML
<ul>
</ul>
CSS
li {
background: beige;
padding: 5px;
font-family: 'PT Serif', Georgia, Times, 'Times New Roman', serif;
color: #333;
}
li:nth-child(odd) { background: white; }
JavaScript
// create links for AKAMAI flushing
String.prototype.format = function() {
var formatted = this;
for (var i = 0; i < arguments.length; i++) {
var regexp = new RegExp('\\{'+ i +'\\}', 'gi');
formatted = formatted.replace(regexp, arguments[i]);
}
return formatted;
};
function generateAllUrls(base) {
var countryCodes = "ar/es|at/de|au/en|be/fr|be/nl|bg/bg|bo/es|br/pt|by/ru|ca/en|ca/fr|ch/de|ch/fr|cl/es|cn/zh|co/es|cz/cs|de/de|dk/da|ec/es|ee/et|emea_africa/en|emea_africa/fr|emea_middle_east/ar|emea_middle_east/en|es/es|fi/fi|fr/fr|gr/el|hk/en|hk/zh|hr/hr|hu/hu|id/en|ie/en|il/he|in/en|it/it|jp/ja|kr/ko|kz/ru|lamerica_nsc_carib/en|lamerica_nsc_cnt_amer/es|lt/lt|lv/lv|mx/es|my/en|nl/nl|no/no|nz/en|pe/es|ph/en|pl/pl|pr/es|pt/pt|py/es|ro/ro|rs/sr|ru/ru|sa/ar|se/sv|sg/en|si/sl|sk/sk|za/en|th/en|tr/tr|tw/zh|ua/ru|uk/en|us/en|uy/es|ve/es|vn/en|ua/uk".split("|");
$.each(countryCodes, function (index, locale) {
$("ul").append($("<li>" + base.format(locale) + "</li>"));
});
}
//generateAllUrls("http://www8.hp.com/{0}/system/styles/d.css");
//generateAllUrls("http://www8.hp.com/{0}/system/styles/d-ie.css");
generateAllUrls("http://www8.hp.com/{0}/scripts/d.js");