Skip to content

Commit c72f6d2

Browse files
committed
fixing code blocks in tables
1 parent 9f84d47 commit c72f6d2

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

docs/general-development/optimize-page-performance-in-sharepoint.md

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.assetid: 262caeef-64fd-4e02-b947-d772faf01159
88

99
# Optimize page performance in SharePoint
1010
Learn about features to improve performance in pages in SharePoint. These features can be used to enhance the experience in geographically distributed implementations.
11-
* **Provided by: *** David Crawford, Microsoft Corporation
11+
**Provided by:** David Crawford, Microsoft Corporation
1212

1313

1414

@@ -33,7 +33,7 @@ The following table shows some benefits of using MDS.
3333
|:-----|:-----|
3434
|Fewer amounts of data downloaded per page request. <br/> |No browser flashing caused by full page reload. <br/> |
3535
|Browser needs to update only the regions of the page that changed since the last request. <br/> |Easy to identify animations. <br/> |
36-
|Small amount of processing required on the client. <br/> **Note:** Half of client Page-Load-Time 1 (PLT1) is due to chrome cascading style sheet (CSS) rendering and JavaScript parsing and execution. |Changes in the page attract user's attention. <br/> |
36+
|Small amount of processing required on the client. <br/>**Note:** Half of client Page-Load-Time 1 (PLT1) is due to chrome cascading style sheet (CSS) rendering and JavaScript parsing and execution. |Changes in the page attract user's attention. <br/> |
3737

3838
Both AJAX and MDS are technologies that request only sections of the page to minimize data download and improve page responsiveness. The following figure shows the MDS architecture.
3939

@@ -101,7 +101,7 @@ The object used for the AJAX navigation is **AjaxNavigate**. By default, there i
101101
ajaxNavigate.update(serverRelativeURL, null);
102102
```
103103

104-
If you want a control or Web Part to listen to the navigation events, you can use the **add_navigate** handler. When the handler is called, your callback function receives a reference to the navigation object and the parsed hash values in a dictionary. The control or Web Part can retrieve the value for the parameter of interest from the dictionary, compare it to the current value, and decide what action it needs to take. A common action is to send an AJAX request to the server to retrieve some data or reorder the items in the view. When a control has finished listening to navigation events, it can use the **remove_navigate** handler.
104+
If you want a control or Web Part to listen to the navigation events, you can use the **add\_navigate** handler. When the handler is called, your callback function receives a reference to the navigation object and the parsed hash values in a dictionary. The control or Web Part can retrieve the value for the parameter of interest from the dictionary, compare it to the current value, and decide what action it needs to take. A common action is to send an AJAX request to the server to retrieve some data or reorder the items in the view. When a control has finished listening to navigation events, it can use the **remove\_navigate** handler.
105105

106106

107107

@@ -291,23 +291,7 @@ You should replace HTML inline script elements with **SharePoint:ScriptBlock** c
291291

292292
|**HTML inline script element**|**MDS-compliant alternative**|
293293
|:-----|:-----|
294-
|
295-
```
296-
297-
<script type="text/javascript">
298-
// Your JavaScript code goes here.
299-
</script>
300-
```
301-
302-
|
303-
```
304-
305-
<SharePoint:ScriptBlock runat="server">
306-
// Your JavaScript code goes here.
307-
</SharePoint:ScriptBlock>
308-
```
309-
310-
|
294+
|`<script type="text/javascript">`<br/>&nbsp;&nbsp;&nbsp;`// Your JavaScript code goes here.`<br/>`</script>`|`<SharePoint:ScriptBlock runat="server">`<br/>&nbsp;&nbsp;&nbsp;`// Your JavaScript code goes here.`<br/>`</SharePoint:ScriptBlock>`|
311295

312296
The introduction of the **SharePoint:ScriptBlock** in the page can change the scope of variables in page. Sometimes it is necessary to move the declaration of variables from `<% %>` to `<script runat="server"> <script>`. To test this, load the page in the browser after you perform updates.
313297

0 commit comments

Comments
 (0)