Language: JavaScript
Label: vulnerable
CWE: CWE-284 \u2014 Improper Access Control
The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

Code:
window.onpageshow=function(event) {
	/**
	 * Same as above for Safari (does not execute Javascript on history back)
	 * persisted indicates if the document is loading from a cache (not reliable)
	 *
	 * @link https://web.dev/bfcache/
	 */
	if (event.persisted
		|| window.performance && (performance.navigation.type == 2
			|| (performance.getEntriesByType
				&& performance.getEntriesByType("navigation")[0]
				&& performance.getEntriesByType("navigation")[0].type === 'back_forward'))) {
		location.reload();
	}
};