Working with fragment cache permission with js