Fossil SCM
Cache the main.js file.
Commit
1760a15156df5260b0933a0a6a0e186e45336982183d5a1d673925485bdb96f2
Parent
7c408d751cb7204…
1 file changed
+5
-3
+5
-3
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -682,11 +682,12 @@ | ||
| 682 | 682 | @ </script> |
| 683 | 683 | |
| 684 | 684 | |
| 685 | 685 | zFooter = skin_get("footer"); |
| 686 | 686 | if( sqlite3_strlike("%</body>%", zFooter, 0)==0 ){ |
| 687 | - @ <script src='%s(g.zBaseURL)/main.js' type='application/javascript'>\ | |
| 687 | + @ <script src='%s(g.zBaseURL)/main.js/%S(MANIFEST_UUID)' \ | |
| 688 | + @ type='application/javascript'></script> | |
| 688 | 689 | } |
| 689 | 690 | if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1); |
| 690 | 691 | Th_Render(zFooter); |
| 691 | 692 | if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1); |
| 692 | 693 | |
| @@ -697,12 +698,12 @@ | ||
| 697 | 698 | cgi_append_content("</span>\n", -1); |
| 698 | 699 | } |
| 699 | 700 | |
| 700 | 701 | /* Add document end mark if it was not in the footer */ |
| 701 | 702 | if( sqlite3_strlike("%</body>%", zFooter, 0)!=0 ){ |
| 702 | - @ <script src='%s(g.zBaseURL)/main.js' type='application/javascript'>\ | |
| 703 | - @ </script> | |
| 703 | + @ <script src='%s(g.zBaseURL)/main.js/%S(MANIFEST_UUID)' \ | |
| 704 | + @ type='application/javascript'></script> | |
| 704 | 705 | @ </body> |
| 705 | 706 | @ </html> |
| 706 | 707 | } |
| 707 | 708 | } |
| 708 | 709 | |
| @@ -845,10 +846,11 @@ | ||
| 845 | 846 | void page_main_js(void){ |
| 846 | 847 | Blob mainjs; |
| 847 | 848 | cgi_set_content_type("application/javascript"); |
| 848 | 849 | blob_init(&mainjs, builtin_text("main.js"), -1); |
| 849 | 850 | cgi_set_content(&mainjs); |
| 851 | + g.isConst = 1; | |
| 850 | 852 | } |
| 851 | 853 | |
| 852 | 854 | |
| 853 | 855 | /* |
| 854 | 856 | ** WEBPAGE: test_env |
| 855 | 857 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -682,11 +682,12 @@ | |
| 682 | @ </script> |
| 683 | |
| 684 | |
| 685 | zFooter = skin_get("footer"); |
| 686 | if( sqlite3_strlike("%</body>%", zFooter, 0)==0 ){ |
| 687 | @ <script src='%s(g.zBaseURL)/main.js' type='application/javascript'>\ |
| 688 | } |
| 689 | if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1); |
| 690 | Th_Render(zFooter); |
| 691 | if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1); |
| 692 | |
| @@ -697,12 +698,12 @@ | |
| 697 | cgi_append_content("</span>\n", -1); |
| 698 | } |
| 699 | |
| 700 | /* Add document end mark if it was not in the footer */ |
| 701 | if( sqlite3_strlike("%</body>%", zFooter, 0)!=0 ){ |
| 702 | @ <script src='%s(g.zBaseURL)/main.js' type='application/javascript'>\ |
| 703 | @ </script> |
| 704 | @ </body> |
| 705 | @ </html> |
| 706 | } |
| 707 | } |
| 708 | |
| @@ -845,10 +846,11 @@ | |
| 845 | void page_main_js(void){ |
| 846 | Blob mainjs; |
| 847 | cgi_set_content_type("application/javascript"); |
| 848 | blob_init(&mainjs, builtin_text("main.js"), -1); |
| 849 | cgi_set_content(&mainjs); |
| 850 | } |
| 851 | |
| 852 | |
| 853 | /* |
| 854 | ** WEBPAGE: test_env |
| 855 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -682,11 +682,12 @@ | |
| 682 | @ </script> |
| 683 | |
| 684 | |
| 685 | zFooter = skin_get("footer"); |
| 686 | if( sqlite3_strlike("%</body>%", zFooter, 0)==0 ){ |
| 687 | @ <script src='%s(g.zBaseURL)/main.js/%S(MANIFEST_UUID)' \ |
| 688 | @ type='application/javascript'></script> |
| 689 | } |
| 690 | if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1); |
| 691 | Th_Render(zFooter); |
| 692 | if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1); |
| 693 | |
| @@ -697,12 +698,12 @@ | |
| 698 | cgi_append_content("</span>\n", -1); |
| 699 | } |
| 700 | |
| 701 | /* Add document end mark if it was not in the footer */ |
| 702 | if( sqlite3_strlike("%</body>%", zFooter, 0)!=0 ){ |
| 703 | @ <script src='%s(g.zBaseURL)/main.js/%S(MANIFEST_UUID)' \ |
| 704 | @ type='application/javascript'></script> |
| 705 | @ </body> |
| 706 | @ </html> |
| 707 | } |
| 708 | } |
| 709 | |
| @@ -845,10 +846,11 @@ | |
| 846 | void page_main_js(void){ |
| 847 | Blob mainjs; |
| 848 | cgi_set_content_type("application/javascript"); |
| 849 | blob_init(&mainjs, builtin_text("main.js"), -1); |
| 850 | cgi_set_content(&mainjs); |
| 851 | g.isConst = 1; |
| 852 | } |
| 853 | |
| 854 | |
| 855 | /* |
| 856 | ** WEBPAGE: test_env |
| 857 |