dimanche 27 mars 2016

Avoid hardcoding strings html

What is the best method to avoid hardcoding Strings in HTML code?

e.g:

<p>Website name</p>

So that it can be easily changed globally across the site from one location.

Is the only way to achieve this to create all of the text elements used in the site with a language such as JavaScript or PHP?

I am aware that you could just create the website in HTML and then run a script to change all of the text labels, however this does not seem like a good method - since the user is going to be waiting for the script to download before the labels show.

Would love to hear everyone's ideas to get around this issue :)




Aucun commentaire:

Enregistrer un commentaire