Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Is it possible to allow read-only access in a CORS header? I want JS from two websites to be capable of verifying each other, but not altering each other.

share|improve this question

2 Answers 2

I'm not quite sure what you mean by read-only in this case, because it does depend on the web application using the HTTP-methods/verbs correctly, but this might help:

Access-Control-Allow-Methods: GET
share|improve this answer
up vote -1 down vote accepted

The answer to this is no, there is no way to make resources on a page read-only to JavaScript loaded from another domain.

share|improve this answer
    
I'm not sure who voted this down but it is correct, I wasted a great deal of time trying to make it work. –  Indolering Dec 16 '13 at 4:42
    
I think nobody knows what do you mean by read-only. Javascript can never alter server (or local except local storage) files, so whatever you retrieve is readonly unless you create server (or local) API to save the changes javascript has made. That being said, both your answer and question are quite unclear. –  Tomáš Zato Nov 22 at 13:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.