1

We have the following code:

    <asp:ScriptManager runat="server">
       ...

    <Services>
        <asp:ServiceReference Path="~/JSONServices/ProfileService.svc" />
    </Services>
        ...

This results in a Javascript proxy found in /JSONServices/ProfileService.svc/js. This Javascript has content expiry set to the same time it was called (so it is never cached on the client). Is it possible to have the clients cache these proxies for some time?

1 Answer 1

1

So we finally got around to looking at this again, and we ended up with the following:

  • created a new httphandler that kicks inn for all requests in format *.cachedsvc
  • in the module, forward the request to the path *.svc (where the real proxy is located), and cache the result from the built in .svc handler for a set time.

seems to do the trick.

All we then need to do is to specify the cacheable paths in our scriptmanagers instead of the real path of the .svc (editor flags it as a bug naturally, but it works like a charm)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.