-1

I never touched the Apache 'inner files', but now I need to add a string (that isn't static) to the end of some JavaScript files when serving them via Apache. What should I do / learn to achieve this? Where can I check for a request for a file (myfile.js) and then add a string to the client before he downloads the file?

I'd really like to learn how things work and I don't really have a clue of where to start.

Thanks in advance.

1 Answer 1

1

If the string you want to append "isn't static" then simply generate the whole file using the same method as the bit which isn't static.

Or just add another script tag on the page pointing to the URL which generates the non-static bit of javascript.

Alternately fire off a PJAX/SJAX request from the static file to get the dynamic part and inject it at the browser.

1
  • Any resources I could use? I'm not very familiar with most of the terms here.
    – funerr
    Aug 13, 2013 at 14:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .