News for hackers. Stuff that matters.
Re:Ask HN - Allowing other sites to embed Your content (eg. ... by materialhero on Thursday December 13, 2012 @11:59PM (#4919679)
Thanks for the quick response. Lets say for the sake of simplicity (and a short weekend project) that I want to have a <div> on my site that anyone can copy a code <script type="text/javascript" src="//www.mycrummysite/mydiv.js"></script> and put on their website so that it shows the my div. Every time i change the contents of the div, it also changes on their site. That seems like a good way to start. Is there a quick way to learn how to do this?
Re:Ask HN - Allowing other sites to embed Your content (eg. ... by andrewmunsell on Friday December 14, 2012 @03:32PM (#4923144)
You can't do it that way-- once someone copies the code, it can never be changed by you. What you can change is the contents of the Javascript file. For example, when I make an update to my service, I upload the changes to script.js and the new code is run on the sites that embed that script.