Jump to content

Plugin Development issue: script is being commented out of the page load


chef
Go to solution Solved by chef,

Recommended Posts

chef

Hi!

 

My plugin has a second page for configuration. When the client is loading this page the server is sending a 304 response, which I believe is telling the client to load resources from a cache. I think.

 

This causes the page to load improperly. I might be wrong but the the log has this:

2018-08-22 09:28:02.298 Info HttpServer: HTTP Response 304 to 192.168.2.18. Time: 0ms. http://192.168.2.95:8096/web/configurationpage?name=ClientConfigPage 

304 NOT MODIFIED

A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to false.

In other words, there is no need for the server to transfer a representation of the target resource because the request indicates that the client, which made the request conditional, already has a valid representation; the server is therefore redirecting the client to make use of that stored representation as if it were the payload of a 200 OK response.

Edited by chef
Link to comment
Share on other sites

chef

Further inspection of the page data, the script is being commented out on load, which would make sense why nothing has loaded.

 

Why would that happen?

Link to comment
Share on other sites

I would compare your code to some of our open source plugins because they're not having that problem.

Link to comment
Share on other sites

chef

@@Luke, Am I right in my assumption that as long as the external js file is named the same as the html file, the server will load it properly?

 

EDIT, shit! Embedded resources again... sorry man!

Edited by chef
Link to comment
Share on other sites

  • Solution
chef

I got it sorted. Thanks. It took me a second to catch on. I haven't developed code like that before. @@Luke

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...