-
How add jquery-1.10.2.js localy(Without Internet access)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can take the same technique as the code I provided to you in another thread. #26 To deploy the JQuery library on the client browser, the HTML headers commonly written are: and you will follow them as well. <head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<!-- Access to ESP32 localhost:js/jquery.min.js -->
<script src='js/jquery.min.js'></script>
</head> That is, you can trap the client's access to
As you can see, your problem has nothing to do with PageBuilder, it's just a matter of using the WebServer class. In order to use the WebServer class properly, the user needs to learn the basics of HTTP and the programming design to realize the client-server model. |
Beta Was this translation helpful? Give feedback.
You can take the same technique as the code I provided to you in another thread. #26
However, another approach based on the same idea is needed to implement it. Because jQuery.js script code is too big to handle in Arduino's String class. To properly read JQuery.js as a local resource from ESP32's SPIFFS and return it to the client, use the streamFile function of the ESP32's WebServer class.
To deploy the JQuery library on the client browser, the HTML headers commonly written are: and you will follow them as well.