I add a tag to my page source in share point designer to use in my javascript,
and then save it. but when I refresh my page, it shows me that its not saved.
Have you checked that version control isn't acting on that resource? You should check in a major version to publish it.
Right click on the page and then there is an option to check in a major version (see below screenshots).